How is text and text cursor position controlled in XuiTextArea grids?
Send a #SetTextCursor message to XuiTextArea grids to position the text cursor within the body of text and to position the text within the grid, as follows: XuiSendMessage (grid, #SetTextCursor, v0, v1, v2, v3, kid, 0) v0 = cursorPos = set text cursor to this character # on the cursor line. v1 = cursorLine = set text cursor to this line #. v2 = leftIndent = horizontal pixel # to start displaying line. v3 = topLine = top line of displayed text. any argument can be -1 to say don’t change current value. Whenever one or more of these values is changed with #SetTextCursor, a check is performed to make sure the values are reasonable and consistent. So it is not possible to place the text cursor outside the text region, set the top line such that the cursor is not in the displayed portion of text, etc. Reasonable values are assigned. Incidently, #SetTextCursor is also recognized by: XuiDropBox – v0 sets cursorPos in the XuiTextLine kid v1 sets cursorLine in the XuiPullDown kid XuiDropButton –
Related Questions
- What is new in OCR version 2.0 about the feature of associating the caret position in the text file with its location in the image file?
- Does GetWord support capturing text at a given position? How can I retrieve the position of the mouse cursor and the caret position?
- Sometimes its a little hard to find the text cursor in a large XuiTextArea?