Página 1 de 1

Combobox behaviour

Publicado: Lun Oct 09, 2006 4:08 pm
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)Â

Combobox behaviour

Publicado: Lun Oct 09, 2006 5:11 pm
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.
>
>
>

Combobox behaviour

Publicado: Lun Oct 09, 2006 5:11 pm
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.
>
>
>