Jump to content

Caret position in TextBox in C#


Guest Petyas

Recommended Posts

How is it possible to get a caret position (row,collumn or current char position in string) in textbox control. TextBox have a method Select(position, length), but how can i obtain current position? If isn't way in C#, exists some method what i can import from any DLL? I found only method GetCaretPosition from coredll.dll. This method returns x, y position of caret, but this method i cannot use, because every char has a different width. This i need for select, cut, copy and paste.

Any idea?

Thanks

Link to comment
Share on other sites

  • 3 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.