Hello, I am one of NVDA developers and I have a potentially noob question regarding wxPython.
I have a TextCtrl with some text in it, and I am trying to select part of that text in such a way that caret stays at the front of selection. And I can’t seem to find a way to do so.
-
SetSelection()
method always puts caret behind, not no matter the order of its arguments; -
SetInsertionPoint()
removes current selection. - SEnding
EM_SETSEL
message also puts caret behind selection regardless of the order of its arguments.
Am I missing anything or is that really impossible?
Thanks!
P.S> If anyone is interested as to why do I need to put caret in the front of selection: I am trying to improve word navigation and word selection for NVDA users. In particular I would like to have many customizable word definitions. Som word definitions would go inside longCamelCaseIdentifiers. Word navigation so far works beautifully, but I am struggling with word selection. If a user selects text backwards - e.g. with control+shift+LeftArrow, I need to put caret in front of selection - otherwise it wouldn’t play nice with other selection commands.