[fxruby-users] Intercepting and reviewing FXText messages, especially KEY_PRESS|SEL_INSERTED
jason at jolierouge.net
Mon May 19 15:24:50 EDT 2008
Lyle Johnson wrote:
> Well, if you catch the SEL_KEYPRESS message (instead of
> SEL_KEYRELEASE) you can interecept the Tab key press before any text
> gets inserted, right? And if you determine that there is some
> "snippet" text before the current cursor position, you would (I guess)
> insert the expanded text and then return true to indicate that your
> message handler handled the event and FXText's regular SEL_KEYPRESS
> handler doesn't need to do anything else with it. If you instead
> determine that there is no "snippet" text to try to expand, you'd want
> to return false from the message handler so that the default
> SEL_KEYPRESS processing kicks in.
> Hope this helps,
Thanks, that was the piece of info I was looking for, I am sure it's
written somewhere, but I missed it. I didn't know that returning false
would cause the keypress/message to be sent on. I guess I thought it
kinda died there on the operating table...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fxruby-users