HotKey on ButtonBar

Post Reply
User avatar
Ari
Posts: 128
Joined: Fri Feb 03, 2006 4:21 pm
Location: Brazil
Contact:

HotKey on ButtonBar

Post by Ari »

Não funciona o HotKey na buttonbar ?

Tem que criar um method keydown na Buttonbar ?

Ari

isso pode funcionar ? ..vou tentar

Code: Select all


METHOD KeyDown( nKey, nFlags ) CLASS TBar

   ::oWnd:nLastKey := nKey

   do case
      case nKey == VK_UP .or. nKey == VK_LEFT
           ::oWnd:GoPrevCtrl( ::hWnd )
           return 0

      case nKey == VK_DOWN .or. nKey == VK_RIGHT
           ::oWnd:GoNextCtrl( ::hWnd )
           return 0

      case nKey == VK_RETURN
           PostMessage( ::hWnd, FM_CLICK )    // fire the button's action
           return 0
   endcase

return Super:KeyDown( nKey, nFlags )
User avatar
Ari
Posts: 128
Joined: Fri Feb 03, 2006 4:21 pm
Location: Brazil
Contact:

Post by Ari »

Não funciona, o "prompt" não fica sublinhado "&"

preciso colocar HOTKEY nos botões da barra, tem cliente muito antigo que tá viciado nos ALT-B..etc.

Ari
Post Reply