From: Steve Tuckner Date: 2003-01-28T07:52:19+09:00 Subject: Re: FXTexr and widget focus If you know how to set focus to the next widget, then all you have to do is capture the TAB keypress. You can do this by subclassing the FXText widget and capture the keypresses. class MyTextWidget < FXText def initialize(*args) FXMAPFUNC(SEL_KEYRELEASE, 0, "onKeyRelease") def onKeyRelease(sender, sel, event) if event.code == Fox::KEY_Tab then # switch focus end end end > -----Original Message----- > From: Gordon Hartley [mailto:gordonhartley@gordonhartley.com] > Sent: Monday, January 27, 2003 4:19 PM > To: ruby-talk ML > Subject: FXTexr and widget focus > > > Hi, > > Just got an annoying problem with changing focus off of a FXText > widget (note: not FXTextField). > > All the other widgets on my form seem to be fine for tabbing away > from, but the multiline FXText instead consumes the tabs and stores > them as a character instead. > > Anyway, what's the appropriate solution for this? At the moment, I've > got a hotkey which sets focus on the next control, but that's still > quite painful, especially since the form is meant to be used for data > entry... > > The docs on the Fox site don't actually have anything under the > 'keyboarding' section, so just wondering what other people have done? > (I presume I'm not the first with this problem?) > > Any ideas? > >