Re: Typing into a Combobox
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 03, 2004
- 461 views
unknown wrote: > > Is it possible to know which keystroke has been typed into the text box of a > combo > before reading all the text? > I mean to know in real time if an ESC or CR key have been pressed... If you are using Win32lib its easy. There is an undocumented (sorry) routine called "getEdit" that returns the id of the combobox's edit area. You can use that to set a handler to trap keystrokes. Something along the lines of ...
procedure keytrap(integer self, integer event, sequence parms) if parms[1] = VK_ESC then . . . elsif parms[1] = VK_ENTER then . . . end if end procedure setHandler(getEdit(MyCombo), w32HKeyPress, routine_id("keytrap"))
-- Derek Parnell Melbourne, Australia