Re: Trapping return and excape in a ComboBox
- Posted by petelomax at blueyonder.co.uk Sep 01, 2002
- 391 views
On Sun, 1 Sep 2002 09:43:43 +0000, Mario Steele <euphmario at yahoo.com> wrote: >First off, you do not need to do onGotFocus events for Labels. Labels >never receive focus. True, they don't. It's for the Alt-letter handling. Without it, Alt-A (for Address) hides the focus away somewhere & when you tab it goes back to the First Control Created. >Second, I would suggest you use >onKeyPress, instead of onKeyDown. It works out exactly the same, behaving fine on an EditText control, not on a ComboBox. Ah, I think I have another clue: when the dropdown is showing (see below for changes needed to that example I posted), then CR & ESC *are* trapped for a ComboBox; so it appears to be attaching the onkeyxxx to the list part rather than the edittext part of the combo? >Again, I could be wrong, never know. At least you were right about something Thanks anyway. Pete == update line 6 with depth 240: == constant name = create( ComboBox, "", MAIN, 70, 10, 200, 240, 0 ) = and paste these four lines in at the end to see what I mean: == addItem(name,"one") addItem(name,"two") addItem(name,"three") setText(name,"zero") WinMain( MAIN, Normal )