Combobox behaviour
Publicado: Lun Oct 09, 2006 4:08 pm
Dear developers!
I use keyboard when I work with comboboxes.
When items list is dropped down and I press ENTER, dropped down list is not
closed with selected item
(such behaviour is standard in Windows - like F4 key).
When items list is dropped down and I press ESC, the dialog is closed (see
project in test8.zip).
I can workaround these problems with code like this:
METHOD Combobox1KeyDown(oSender, nKey, nFlags) CLASS TFORM1
if nKey==VK_ESCAPE
if oSender:lDropped
oSender:lDropped:=.f.
return 0
endif
elseif nKey==VK_RETURN
if oSender:lDropped
oSender:lDropped:=.f.
return 0
endif
endif
return Nil
Can you fix this?
P.S. I work on Win98SE.
Thank you.
Oleg.
Attached files test8.zip (1.5 KB)Â
I use keyboard when I work with comboboxes.
When items list is dropped down and I press ENTER, dropped down list is not
closed with selected item
(such behaviour is standard in Windows - like F4 key).
When items list is dropped down and I press ESC, the dialog is closed (see
project in test8.zip).
I can workaround these problems with code like this:
METHOD Combobox1KeyDown(oSender, nKey, nFlags) CLASS TFORM1
if nKey==VK_ESCAPE
if oSender:lDropped
oSender:lDropped:=.f.
return 0
endif
elseif nKey==VK_RETURN
if oSender:lDropped
oSender:lDropped:=.f.
return 0
endif
endif
return Nil
Can you fix this?
P.S. I work on Win98SE.
Thank you.
Oleg.
Attached files test8.zip (1.5 KB)Â