Page 1 of 1

Context Menu (right-click-Menu) for Control

Posted: Sat Nov 23, 2019 4:02 am
by AUGE_OHR
hi,

can someone point me how to get a Menu for a GRID ?

i do not mean the Menu under Titlebar.
when have a TEXTBOX right-click show Menu with copy/paste. this Type of Menu

Re: Context Menu (right-click-Menu) for Control

Posted: Sat Nov 23, 2019 4:49 am
by andyglezl

Code: Select all

      DEFINE CONTROL CONTEXT MENU <ControlName> [ OF <ParentWindowName> ]
            MENUITEM <cItemCaption>
                  ACTION <ActionProvedureName> | <bBlock>
                  [ NAME <MenuItemName>]
                  [ IMAGE <cImageName> ]
                  [ CHECKED ]
                  [ NOTRANSPARENT ]
                  [ TOOLTIP <cToolTipText> ]
            ...
            ...
            [ SEPARATOR ]
            ...
            ...
      END MENU


Re: Context Menu (right-click-Menu) for Control

Posted: Sat Nov 23, 2019 6:41 am
by AUGE_OHR
hi,

thx for Answer.

but again i seems to have a Problem with Macro

Code: Select all

Public fMain:="frmMain"
   DEFINE WINDOW &fMain ;
      ...
      DEFINE GRID Grid_1
      ...
      END GRID
      // how it the right Syntax for GRID as Parent ?
      DEFINE CONTROL CONTEXT MENU PopGrid OF frmMain.Grid_1
      DEFINE CONTROL CONTEXT MENU PopGrid OF fMain.Grid_1
      
so how is the right Syntax :?:

Re: Context Menu (right-click-Menu) for Control

Posted: Sat Nov 23, 2019 11:33 am
by danielmaximiliano
Try

Code: Select all

DEFINE WINDOW &(fMain)

Re: Context Menu (right-click-Menu) for Control

Posted: Sat Nov 23, 2019 7:02 pm
by edk
AUGE_OHR wrote: Sat Nov 23, 2019 6:41 am hi,

thx for Answer.

but again i seems to have a Problem with Macro

Code: Select all

Public fMain:="frmMain"
   DEFINE WINDOW &fMain ;
      ...
      DEFINE GRID Grid_1
      ...
      END GRID
      // how it the right Syntax for GRID as Parent ?
      DEFINE CONTROL CONTEXT MENU PopGrid OF frmMain.Grid_1
      DEFINE CONTROL CONTEXT MENU PopGrid OF fMain.Grid_1
      
so how is the right Syntax :?:
see example: http://hmgforum.com/viewtopic.php?p=60081#p60081

Re: Context Menu (right-click-Menu) for Control

Posted: Sun Nov 24, 2019 2:56 am
by AUGE_OHR
edk wrote: Sat Nov 23, 2019 7:02 pm see example: http://hmgforum.com/viewtopic.php?p=60081#p60081
YES, that was the Solution :!: