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

Post Reply
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

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

Post 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?
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Gilbert,

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

Please try it there, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Post 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.
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
Post Reply