FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Hot-Key for BUTTON of BUTTONBAR ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Hot-Key for BUTTON of BUTTONBAR ?
Posted: Sun Nov 27, 2022 06:19 AM
hi,

how can i call "ACTION" of a BUTTON from BUTTONBAR using HotKey :?:

i know bKeyDown but how to "POST" Event to BUTTON as there is no Object, or :idea:
Code (fw): Select all Collapse
DEFINE WINDOW oWnd FROM 0, 0 TO 1024, 1280 PIXEL TITLE "DBF " + cFile
   DEFINE BUTTONBAR oBar SIZE 96,48  OF oWnd
      DEFINE BUTTON OF oBar PROMPT "Codepage" ;
                 TOOLTIP "change Codepage" NOBORDER RESOURCE "MYWORLD" ;
                 ACTION ( nRec := RECNO(), ;
                          ChangeCodePage(cPath,cFile,cAlias),;
                          oBrwDBF:Refresh() ,;
                          DBGOTO (nRec) )
    // where to get Hot-Key from BUTTONBAR ?
    oBar:bKeyDown := { | nKey, nFlag |  DoBarKEy(nKey, nFlag) }
oWnd:bKeyDown := { | nKey, nFlag | IF( nKey = VK_ESCAPE,oWnd:End(),nil ) }
greeting,

Jimmy
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Hot-Key for BUTTON of BUTTONBAR ?
Posted: Sun Nov 27, 2022 08:36 AM

hi,

aha, using Cargo Slot to stare "Name".

thx for Solution

greeting,

Jimmy

Continue the discussion