预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

EA_GetMenuState

Add-Ins can use the EA_GetMenuState event to set a particular menu option to either enabled or disabled. This is useful when dealing with locked Packages and other situations where it is convenient to show a menu option, but not enable it for use.
This event is raised just before Enterprise Architect has to show particular menu options to the user. Its use is further described in the Define Menu Items topic.

Syntax

Sub EA_GetMenuState (Repository as EA.Repository, MenuLocation As String, MenuName as String, ItemName as String, IsEnabled as Boolean, IsChecked as Boolean)
The EA_GetMenuState function syntax has these parameters.

Parameter

Type

See also

Repository

EA.Repository
Direction: IN
Description: An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
Repository Class

MenuLocation

String
Direction: IN
Description: A string representing the part of the user interface that brought up the menu. This can be TreeView, MainMenu or Diagram.

MenuName

String
Direction: IN
Description: The name of the parent menu for which sub-items must be defined. In the case of the top-level menu it is an empty string.

ItemName

String
Direction: IN
Description: The name of the option actually clicked; for example, 'Create a New Invoice'.

IsEnabled

Boolean
Direction: OUT
Description: Set to False to disable this particular menu option.

IsChecked

Boolean
Direction: OUT
Description: Set to True to check this particular menu option.

Return Value

None.

Learn more