In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Combobox behaviour

Xailer professional forum in English
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Combobox behaviour

Mensaje por Oleg »

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)Â
Responder