Page 1 of 1

Tab Key Won't Work in Combobox (as Dropdown)

Posted: Tue Jun 03, 2008 1:21 pm
by gkuhnert
Hi,

if I use combobox as dropdown, the tab key won't get you to the next control, but shift+tab does work.
So, in tget.prg, I separated the case nKey == VK_TAB from nKey == VK_RETURN to find out, if in case VK_TAB the Classname is "TCOMBOBOX" like this:

Code: Select all

      case nKey == VK_TAB
           if ::bChange != nil
              lAccept = Eval( ::bChange, nKey, nFlags, Self )
              if ValType( lAccept ) == "L" .and. lAccept
                 if Upper( ::oWnd:ClassName() ) == "TCOMBOBOX"
                    ::oWnd:oWnd:GoNEXTCtrl( ::hWnd )
                 else
                    ::oWnd:GonextCtrl( ::hWnd )
                 endif
              endif
           else
              if Upper( ::oWnd:ClassName() ) == "TCOMBOBOX"
                 ::oWnd:oWnd:GonextCtrl( ::hWnd )
              else
                 ::oWnd:GonextCtrl( ::hWnd )
              endif
           endif
           return 0
My question now is, is if there is any reason, why in case shift+tab the classname "TCOMBOBOX" is considered and not in case of only tab?

Posted: Thu Jun 05, 2008 7:16 am
by Antonio Linares
Gilbert,

fwh\samples\combos.prg is working fine using Tab.

Please try it there, thanks

Posted: Mon Jun 09, 2008 8:04 am
by gkuhnert
Antonio,

thanks for your hint (I should have found it myself although)!

But I experienced, that SHIFT+TAB isn't working properly in the second combobox.