0

I have simple WinForm app to learn C#.

It contains TextBox and when I started my app all text in this TextBox is selected by default.

Which property I should set to make the text unselected? enter image description here

Shaharyar
  • 11,749
  • 4
  • 46
  • 62
algot
  • 2,368
  • 3
  • 18
  • 23

2 Answers2

1

Set your SelectionStart to 0.

text1.SelectionStart = 0;
ragerory
  • 1,340
  • 1
  • 7
  • 26
1

You can set the TagStop property to false or you set the tagindex to another number when you initialize the Form.

Maaaaa
  • 388
  • 1
  • 16