[fxruby-users] Keeping child focused in FXTabBook (on key press)
info at sten-net.de
Thu May 19 17:15:41 EDT 2005
Jannis Pohlmann schrieb:
> Hi list, hi Lyle.
> I've got some problems here using a (now enabled, thanks to Lyle)
> FXScrollArea in a FXTabBook
> When pressing the KEY_Up or KEY_Left the FXScrollArea looses its
> focus. Instead, the related
> FXTabItem gets focused. Usually, that's okay and I assume it is an
> intended behaviour.
> A topic that I couldn't find being discussed anywhere, neither on
> fxruby.org nor on the list (didn't
> I search hard enough?) was how to ignore those focus changes.
> I've browsed the FOX source once again. FXScrollArea is derived from
> FXComposite. This means
> that it sends SEL_KEYPRESS events to its target by default (or better,
> when begin enabled).
> And it sends SEL_FOCUS_UP to itself, handling it by itself. Hmmm,
> well, still, I didn't find
> the point which handler I'd have to overload/overwrite in order to
> ignore the message which
> leads to the focus change.
> I hope there's someone out there who has an idea.
> Kind regards,
I just found it out by myself: I had to write a
FXMAPFUNC(SEL_KEYPRESS, 0, :onKeyPress)
in my FXScrollArea subclass and add a
statement into :onKeyPress. That's all. I found the solution in
More information about the fxruby-users