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
  • 12,254
  • 4
  • 46
  • 66
algot
  • 2,428
  • 3
  • 19
  • 23

2 Answers2

1

Set your SelectionStart to 0.

text1.SelectionStart = 0;
ragerory
  • 1,360
  • 1
  • 8
  • 27
1

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

Maaaaa
  • 388
  • 2
  • 16