TextAreaChar ( textarea,line )
Parameters
|
textarea - text area gadget line - line number, starting at 0 |
Description
|
Returns the character position where a line of a text area starts. Requires Extended language mode. Character positions count whole Unicode characters from 0 at the start of the text - the same positions SetTextAreaText, TextAreaText and TextAreaCursor use, which makes this the bridge from line-based thinking to range-based commands. To highlight one line of a script pane: start=TextAreaChar(area,line) FormatTextAreaText area,255,80,80,0,start,TextAreaLineLen(area,line) Out-of-range lines are forgiving: 0 or below returns 0, and a line past the last returns the total text length. TextAreaLine converts the other way, from a character position to its line. See also: TextAreaLine, TextAreaLineLen, TextAreaLen, TextAreaCursor. |
Index