detecting current line in a RichTextBox
-
does anyone know how i can detect the position of the cursor in a richtextbox control? i have a text file that is displayed in the rtb control and i want to determine what the line and character position of the cursor is. ANY help on this is appreciated. thanks. :)
-
does anyone know how i can detect the position of the cursor in a richtextbox control? i have a text file that is displayed in the rtb control and i want to determine what the line and character position of the cursor is. ANY help on this is appreciated. thanks. :)
-
int myLine = rtf1.GetLineFromCharIndex(rtf1.SelectionStart); I'm not an expert yet, but I play one at work. Yeah and here too.
-
Thanks for your help. This was just enough to get me started. I had no idea there was actually a method for this...i guess i should have looked at msdn first. :) btw, experts are those who never admit it. :) i appreciate your help.