Context Menu (right-click-Menu) for Control

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Context Menu (right-click-Menu) for Control

Post 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
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

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

Post 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

Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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 :?:
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

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

Post by danielmaximiliano »

Try

Code: Select all

DEFINE WINDOW &(fMain)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
edk
Posts: 997
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

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

Post 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
User avatar
AUGE_OHR
Posts: 2093
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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 :!:
have fun
Jimmy
Post Reply