georgehoaghea
Programmer
Hi
I try to don't use arrows in combobox, except if dropdowned.
Looking to thread184-603260 it gave me a way. But it doesn't work properly.
KeyPress event:
IF This.mDrop =.F.
DO CASE
CASE nKeyCode == 24 &&down
IF This.ListIndex >= 1 and This.ListIndex < This.ListCount
This.ListIndex = This.ListIndex - 1
ENDIF
KEYBOARD '{TAB}'
CASE nKeyCode == 5 &&up
IF This.ListIndex > 1 and This.ListIndex <= This.ListCount
This.ListIndex = This.ListIndex + 1
ENDIF
KEYBOARD '{BACKTAB}'
ENDCASE
ELSE
IF nKeyCode == 13 &&enter
KEYBOARD '{TAB}'
ENDIF
ENDIF
DropDown:
This.mDrop = .T.
LosFocus:
This.mDrop = .F.
Problem occurs when last element in list and press UP (It skips to first element)
Any idea?
Thanks
I try to don't use arrows in combobox, except if dropdowned.
Looking to thread184-603260 it gave me a way. But it doesn't work properly.
KeyPress event:
IF This.mDrop =.F.
DO CASE
CASE nKeyCode == 24 &&down
IF This.ListIndex >= 1 and This.ListIndex < This.ListCount
This.ListIndex = This.ListIndex - 1
ENDIF
KEYBOARD '{TAB}'
CASE nKeyCode == 5 &&up
IF This.ListIndex > 1 and This.ListIndex <= This.ListCount
This.ListIndex = This.ListIndex + 1
ENDIF
KEYBOARD '{BACKTAB}'
ENDCASE
ELSE
IF nKeyCode == 13 &&enter
KEYBOARD '{TAB}'
ENDIF
ENDIF
DropDown:
This.mDrop = .T.
LosFocus:
This.mDrop = .F.
Problem occurs when last element in list and press UP (It skips to first element)
Any idea?
Thanks