Fired when a menu item on the custom context menu is clicked

Parameters

ParameterDescription
ItemKeyThe key of the item clicked
UserDataThe data originally passed when showing the context menu

Remarks

The OnContextMenuClick event fires when the user clicks on an item withing the context menu that was created with a call to the ShowContextMenu method.

The ItemKey parameter is the unique key you associated with the item when you create it. So, if you created an item with the key "1" whose text was "Copy", then this parameter would be "1".

The UserData parameter contains the data you passed into the UserData parameter of the ShowContextMenu method. It is passed for your convenience.

Example

Transfer Param1 to ItemKey 
Transfer Param2 to UserData 

Begin Case 
   Case ItemKey EQ "CUT"  ; GoSub Cut 
   Case ItemKey EQ "COPY" ; GoSub Copy 
   Case ItemKey EQ "PASTE" ; GoSub Paste 
   Case ItemKey EQ "ZOOMIN" ; GoSub Zoom_In 
   Case ItemKey EQ "ZOOMOUT" ; GoSub Zoom_Out 
End Case

See Also

ShowContextMenu

  • No labels