Hello David,<br><br>First off, welcome to the wxRuby community. Always nice to see new faces around, and more interest being sparked in wxRuby, especially since it is getting more stable with every release we make. To capture Focus Lost, you would need to use evt_kill_focus(), this detects when a control looses focus. It's specifically for Windows, but since
99.9 percent of the classes we use in wxRuby, are derived from wxWindow, you should be able to utilize the evt_kill_focus() to detect when a control (Such as a combo box), has lost focus.<br><br>Don't think we have a full example of evt_kill_focus() and it's counterpart evt_set_focus(), but it's pretty simple, and you can find the docs for it here:
<a href="http://wxruby.rubyforge.org/doc/focusevent.html">http://wxruby.rubyforge.org/doc/focusevent.html</a><br><br>If you have any more questions, feel free to ask, we're more then happy to help out.<br><br>L8ers,<br>
<br>Mario Steele<br><br><div><span class="gmail_quote">On 1/19/08, <b class="gmail_sendername">David Morton</b> <<a href="mailto:mortonda@dgrmm.net">mortonda@dgrmm.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>I'm new to wxruby, and I haven't found any answer with google: Is<br>there a way to capture a lose focus event on controls, such as a combo<br>box? All my experiments show events when changing the text, but not
<br>when leaving the box.<br><br>I want to make a combobox that autocompletes if I press tab (or down<br>arrow or something), but if I click out or hit enter it needs to<br>prompt me to add a new value. I'm trying to duplicate a behaviour in
<br>an Access app - I'd really like to ditch Access!<br><br><br>On a higher level explanation, in case there's a better way to do it...<br><br>I want it to search as I type, displaying possible matches, and let me
<br>complete with one of the matches, or if there is no match use the<br>current search to create a new record.<br><br>David Morton<br>Maia Mailguard <a href="http://www.maiamailguard.com">http://www.maiamailguard.com</a>
<br><a href="mailto:mortonda@dgrmm.net">mortonda@dgrmm.net</a><br><br><br><br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.7 (Darwin)<br><br>iD8DBQFHkipRUy30ODPkzl0RAi1bAKDNUbpfevGbpbkDQ8SqXXLZdDcrwQCfcE9G<br>3SLeVn92PcX8dgBXonwo0TA=
<br>=ndvX<br>-----END PGP SIGNATURE-----<br>_______________________________________________<br>wxruby-users mailing list<br><a href="mailto:wxruby-users@rubyforge.org">wxruby-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/wxruby-users">
http://rubyforge.org/mailman/listinfo/wxruby-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mario Steele<br><a href="http://www.trilake.net">http://www.trilake.net</a><br><a href="http://www.ruby-im.net">http://www.ruby-im.net
</a><br><a href="http://rubyforge.org/projects/wxruby/">http://rubyforge.org/projects/wxruby/</a><br><a href="http://rubyforge.org/projects/wxride/">http://rubyforge.org/projects/wxride/</a><br><a href="http://rubyforge.org/projects/vwmc/">
http://rubyforge.org/projects/vwmc/</a>