Hello !
I've got a wxTextCtrl widget with an associated wxKeyEvent "OnKeyUp".
I wonder how to get the position of the cursor in the Text Control, I mean not in absolute coordinates (X and Y) but in number of lettre written.
Let's give an example:
I've got the text written to the text control:
ABCDE.
1) Thanks to the keyboard arrow, I move the cursor after the B.
2) I press backspace key
3) I want to know that the "B" has been deleted (in the OnKeyUp function event).
Obviously, the keyCode of the pressed key is "backspace". I don't know how to get the B, or maybe to get the position in the widget (in this example, the position after B is 2 if it's zero-based).
Thanks for your help.
Alexandre.
How getting the current position in a TxtCtrl ? Topic is solved
-
- Super wx Problem Solver
- Posts: 323
- Joined: Sun Jun 08, 2008 11:59 am
- Location: Bordeaux, France
-
- Super wx Problem Solver
- Posts: 323
- Joined: Sun Jun 08, 2008 11:59 am
- Location: Bordeaux, France