ecnepsnai
ecnepsnai

Reputation: 2026

Get location of the text box cursor

Note: I am talking about the text box cursor (aka the vertical line that shows where you're typing. Not the mouse)

As the nice note says above, I'm trying to get the location of the text cursor as a Point so I can show a popup below it. How do I do this?

Upvotes: 0

Views: 220

Answers (1)

Artless
Artless

Reputation: 4568

Text box has a GetRectFromCharacterIndex method that you can use. For example:

textbox.GetRectFromCharacterIndex(textbox.CaretIndex)

Upvotes: 2

Related Questions