Hi. I have a wxRichtextCtrl (although plain text is fine if I can find a way to do this), and I would like to return the last word typed while the user carries on.
You know that way MS Word and OpenOffice etc, highlight a wrongly spelled word as soon as you move away from it? Well that's what I mean (although I need to return the word, not highlight it).
Iv tried all manner of things in an EVT_TEXT event, and to some extent things have worked, right up to the point where I use Backspace or Delete, or move around the document with the mouse or the arrow keys. Once any of those things happen it all falls apart!
At the moment I have two vars. One hold the start and the other holds the end of the current word. When the user hits Return or types a space, I use GetRange() to return the last word and then set Startvar to EndVar and carry on.
Like I said, it works, but only up to a point.
Can anyone help me?