Property: Text for MenuPoint
- Updated2024-09-12
- 1 minute(s) read
Context Menu Object > Properties > Property: Text for MenuPoint
Property: Text for MenuPoint
Specifies the text of the context menu item.
Object.Text
Object | MenuPoint Object with this property |
Object.Text | String with read and write access |
![]() | Note To test the following example script, you must first save the script and register the script as a user command in the dialog box that opens when you select Settings»Extensions»User Commands. |
The following example displays the ID and the text of every item of the context menu:
'--- For DIAdem-NAVIGATOR ------------------------------------------ Call AddUserCommandToEvent("Navigator.Events.OnShowingContextMenu","MyNavigatorOnShowingContextMenu") Sub MyNavigatorOnShowingContextMenu(ParentObj, MenuPoints) Dim MenuPoint For Each MenuPoint in MenuPoints Call MsgBoxDisp(MenuPoint.Id & " " & MenuPoint.Text) Next End Sub '--- For DIAdem-VIEW ------------------------------------------ Call AddUserCommandToEvent("View.Events.OnShowingContextMenu","MyViewOnShowingContextMenu") Sub MyViewOnShowingContextMenu(Area, MenuPoints) Dim MenuPoint For Each MenuPoint in MenuPoints Call MsgBoxDisp(MenuPoint.Id & " " & MenuPoint.Text) Next End Sub