If I call textBox.GetLineFromCharIndex(int) in a TextBox with WordWrap = true , it returns the row index as the user sees (wrapped lines are considered multiple lines), and not a line according to a line break.
Line one extends to // <- word wrapped
here. // <- logical line 1, GetLineFromCharIndex returns line 2
This is line two. // <- logical line 2, GetLineFromCharIndex returns line 3
Does anyone know of a decision to find a logical string from a character index rather than a displayed string?
Zach johnson
source share