Gold
Gold

Reputation: 62424

is there any way to know the position of my cursor - in TextBox control?

i have in my C# (WinForms) program TextBox control

if i have this text in: abcd efg hijklmnop

and i stand with my cursor between c and d = position 3

or i stand with my cursor between h and i = position 10

how to get this position ?

thank's in advance

Upvotes: 3

Views: 138

Answers (1)

jangeador
jangeador

Reputation: 604

Have you tried using TextBox.SelectionStart that should have the current cursor position.

Upvotes: 5

Related Questions