text cursor position

I

Ilann

Hi,

I need to get the text cursor position in a richedit Control, ie I want my
ContextMenu to appear exactly where the user is typing text,


Thanks
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi Ilann,

Look at the RichTextBox.GetPositionFromCharIndex method. The character
index (where the caret is) you can get from RichTextBox.SelectionStart
property
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top