cancel
Showing results for 
Search instead for 
Did you mean: 

Hide "Copy" and "Paste" Contextual Menu

Solved
Highlighted
MEGA

Hide "Copy" and "Paste" Contextual Menu

Hello everybody,

 

I have created a Propertypage for a given object to list linked object in a new tab.

I do not want the "copy" contextual menu to appear when I right click on an object (cf. joined screenshot)

 

Screenshot.jpg

 

How shall I do this ?

 

Thanks !!!!

 

Lionel

2 Replies
MEGA

Re: Hide "Copy" and "Paste" Contextual Menu

Up... Smiley Happy

MEGA

Re: Hide "Copy" and "Paste" Contextual Menu

Well, I tried this solution, and it works :

 

Create a MetaCommand for the MetaClass on which you want to manage the "Copy" menu (same for "Paste" or "Delete" menus).

Create a Macro Linked to this MetaCommand.

Copy&Paste the following code in your macro :

 

Sub CmdCount (obj, count)
count=23 'To manage the "Copy" Menu

'count = 16 'To manage the "Disconnect" Menu

'count = 17 'To manage the "Delete" Menu
'count = 24 'To manage the "Paste" Menu
End Sub

Sub CmdInit(obj,num,name,category)
category = 65554
End Sub

 

Sub CmdCheck(pObjMega, pNumber, pVisibility)
pVisibility = 512 'To hide the menu
End Sub

 

Note that if you do not want to hide the menu, but just have it do something different from the standard (using the CmdInvoke sub)... well, it works, but for an unknown reason, the menu is displayed twice. I suggest that in any cases you hide the standard menu and that you create a new one (other MetaCommand and Macro) with eventually the same name as the hidden one Smiley Happy

 

Lionel