Re: Typing into a Combobox

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu