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
Responder
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)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Combobox behaviour

Mensaje por ignacio »

Oleg,
Ok, done. Thank you for the tip.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=452a4a21@news.xailer.com...]452a4a21@news.xailer.com...[/email]
> 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.
>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

Combobox behaviour

Mensaje por NoName »

Oleg,
Ok, done. Thank you for the tip.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=452a4a21@news.xailer.com...]452a4a21@news.xailer.com...[/email]
> 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.
>
>
>
Responder