Attribute.setDefinitionMenuID


setDefinitionMenuID(menuID, [clientData], [isRelativeID])

Set the menu ID that will be generated when this attribute is editted or double-clicked on. A new menu entry 'Edit definition...' will be automatically added to the context menu, with the ID given. When this menu item is chosen by the user, or the attribute is double-clicked, all modules will be informed that the given menu ID has been triggered. The appropriate module can then handle all three events (creation, edit, double click) in one handler - onMenuClick. Note that the user can still view and modify the underlying modeller definition via the "Edit Attribute..." menu entry. To disable this, call setEdittingMenuID() in preference to this function.

menuIDinteger
clientDataoptional variant This data will be passed back to you, unmodified, in your overrides of onMenuClick() and onMenuUpdate(). Limited to simple types such as strings and integers
isRelativeIDoptional boolean If true, the given menu ID is assumed to be relative to the constant ID_MODULE_MENU_MIN. If false (the default), it is an absolute value
Return valuenone 

See also insertItem appendItem setEditDialog setDoubleClickDialog removeExternalDefinition

Back to Attribute

Back to Overview