I have a problem with a multiline TextCtrl.
In an empty box of my app, if I write: "abcd<newline>abcd" and then I get the length of content of the text box and the cursor position, the two values are not the same. In my case, I aspect '9' for the length of the string and '9' also for the cursor position (or 10 for both).
Code: Select all
long int pos = TextCtrl1->GetInsertionPoint(); long int size = TextCtrl1->GetValue().size();
I'm on Windows, so probably when a press the return for a new line, in the text box are inserted two char: "\r\n". Does GetValue() strip the \r?
I want to get the content of the text box and run some substitutions dependent on the position of the current InsertionPoint...
Have someone some idea how to manage the problem?