In a multi-line control I want to grab the portion of the text that the user has selected.
- a multiline contains "Hello World Canada"
- the user double-taps on "World" and it shows as selected, highlighted
- they then click another control on the panel - or simply tab off the multiline
- in the logic that follows I attempt to grab the 'SelectOffset and 'SelectLength attributes ... but on leaving the multiline the users "World" selection is lost - no longer selected
- so what I really get in SelectOffset is 12, the zero-based offset for the "d" in "World"
- I need to get values 6 and 5
This is in Nomads, under *Nomads object control, and I do not have any OnFocus or OnSelect logic tied to the multiline control either in the Nomads panel definition or in my UI class (although I have tried using them and signal-all-changes and signal-on-exit and everything else I could think of).
I can, of course, do a ML'SelectOffset=6 and ML'SelectLength=5 and manually highlight "World", so that works...
...but how to I grab "World" when the user selects it and leaves the multiline control?