[wxruby-users] lose focus event?
David Morton
mortonda at dgrmm.net
Sat Jan 19 19:13:23 EST 2008
-----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-----
More information about the wxruby-users
mailing list