[wxruby-users] lose focus event?
David Morton
mortonda at dgrmm.net
Sat Jan 19 21:38:24 EST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
From what I can tell from various wxwidget sources, it seems that
most controls do not send the event up to the control level, and I saw
one post that was attempting to bind an event... is this the
EvtHandler#connect method?
On Jan 19, 2008, at 6:22 PM, Mario Steele wrote:
> 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/
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
David Morton
Maia Mailguard http://www.maiamailguard.com
mortonda at dgrmm.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHkrQhUy30ODPkzl0RApl/AKDV5mFHh7YCGNKd8ji2TXKG+u3d+QCcDnG/
GLo2hIMbyp7bi7uqLlAIZD0=
=EAfD
-----END PGP SIGNATURE-----
More information about the wxruby-users
mailing list