[wxruby-users] lose focus event?
Mario Steele
mario at ruby-im.net
Sat Jan 19 19:22:41 EST 2008
evt_focus does capture all focus changes. The thing to do, is utilize
EvtFocus.get_window, that will return the window that the focus is being
called for.
On 1/19/08, David Morton <mortonda at dgrmm.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> >
> > I see that event firing, but it appears global, firing for everything
> > that loses focus. I've tried to identify what object was responsible
> > via #get_event_object, #get_id, and #id, but no luck so far. How do
> > I associate it with the combo box?
>
>
> I found and example in
> HTTP://wxruby.rubyforge.org/svn/trunk/wxruby2/samples/controls/
>
> but it doesn't work. Did you mean MS Windows when you said it was
> related to windows, or WX windows?
>
> class MyComboBox < ComboBox
> def initialize(*args)
> super(*args)#, style)
>
> evt_set_focus {|event| onFocusGot(event)}
> end
>
>
> def onFocusGot(event)
> log_message("MyComboBox::OnFocusGot")
> event.skip()
> end
>
> end
>
>
>
> David Morton
> Maia Mailguard http://www.maiamailguard.com
> mortonda at dgrmm.net
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
>
> iD8DBQFHkpIjUy30ODPkzl0RAj9MAKCRdrzr370rQyJ3TIkAzhe+WhLl8wCeK355
> Xc40BF9/81vJO1zZ6m1NXFU=
> =OGub
> -----END PGP SIGNATURE-----
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
--
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
http://rubyforge.org/projects/vwmc/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080119/a456e8fb/attachment-0001.html
More information about the wxruby-users
mailing list