Remarks | Properties | Methods | DynProperties | Samples |
ED
|
avaliable
|
RT
|
read only
|
With an object of this type items of a context menu and main menu submenus can be edited, deleted, created,...
ActionID | Caption | Checked |
Count | Enabled | Guid |
HelpFile | HelpTopic | ID |
MenuID | Name | Parent |
ParentID | Password | Picture |
Popup | Seperator | SetValue |
ShowSetValueDlg | Tooltip | Type |
UseCurValue | VarFromElement | Visible |
Create | Delete | DynPropertiesEnum[GET] |
DynProperties[GET] | DynProperties[PUT] | Item |
Name | Type | Description |
---|---|---|
ActValue | Boolean |
Propose current value Only available for
action type "Set Value": Read more in the online manual
|
BackgroundPicRepres | Long |
Alignment Size of the background picture for the menu
entry. Read more in the online manual
|
BackgroundPicture | ZT_FILE |
Graphics file Background picture for the menu entry. Read more in the online manual
|
Caption | String |
Text Text of the menu entry in the menu. Read more in the online manual
|
Checked | Boolean |
Check mark Active: In
front of the menu entry a check mark is displayed Read more in the online manual
|
Enabled | Boolean |
Active Active: The
menu entry is displayed normal and the linked action is executed on
selecting the entry. Read more in the online manual
|
FromElem | Boolean |
Variable from element Only available for
action type "Set Value" and context menus: Read more in the online manual
|
Function | ZT_FUNCTION |
Function Only available for
action type "Function": Read more in the online manual
|
HelpCapture | String |
Chapter Only available for
action type "Help": Read more in the online manual
|
HelpFile | ZT_FILE |
File Only available for
action type "Help": Read more in the online manual
|
Locking | Long |
Interlocking Selection of an interlocking for the menu entry. Read more in the online manual
|
Name | String |
Name Name of the menu entry. Read more in the online manual
|
Password | Long |
Authorization group Password level for executing this menu entry. Read more in the online manual
|
Picture | ZT_FILE |
Bitmap Bitmap that should be displayed with the menu entry. Read more in the online manual
|
Popup-Menu | Boolean |
Submenu Active: The
menu entry does not execute an action, but opens a submenu. Read more in the online manual
|
SWDialog | Boolean |
Dialog Only available for
action type "Set Value": Read more in the online manual
|
Seperator | Boolean |
seperator Active: The
menu entry does not execute an action, but displays a seperator
(horizontal line). Read more in the online manual
|
Signature | Boolean |
Active: Operating the element needs a signature. Attention: Only users that are logged in can sign an action. Signing actions with a temporary login is no longer possible. Inactive: No signature is needed. |
SignatureText | String |
Signature text This text is logged in the Chronologic Event List (CEL) on signing or is proposed as a default in the Runtime, if the signature is defined to be editable in the project properties. Read more in the online manual
|
Sollwert | Double |
Set value/Change by Only available for
action type "Set Value": Read more in the online manual
|
Type | Long |
Action type Seven action types are available: Read more in the online manual
|
VBA-Macro | ZT_VBAMAKRO |
VBA macro Only available for
action type "VBA macro": Read more in the online manual
|
Variable | ZT_VARIABLE |
Variable Only available for
action type "Set Value": Read more in the online manual
|
Visible | Boolean |
visible Active: The
menu entry is displayed in the Runtime. Read more in the online manual
|
'This sample creates a context and a main menu with one item each. 'The main menu item can execute a set value function. 'The context menu item can execute a vba makro. 'Preparation: A variable and a makro have to be available Sub ZenMenuItem() Dim zMenus As ZenMenus 'Parent object Dim zMenu As ZenMenu 'Child object of ZenMenus Dim zMenuItem As ZenMenuItem 'Child object of ZenMenu Set zMenus = MyWorkspace.ActiveDocument.ZenMenus 'Create a main menu Set zMenu = zMenus.Create("Main_1") zMenu.IsPulldown = True 'Create a main menu item Set zMenuItem = zMenu.Create("ID_1", True) 'Set text of menu item zMenuItem.Caption = "First" 'Create a context menu Set zMenu = zMenus.Create("Context_1") zMenu.IsPulldown = False 'Create a context menu item Set zMenuItem = zMenu.Create("id_1", True) 'Set text of menu item zMenuItem.Caption = "first" 'Projects the set value action at the main menu item Call setValue(zMenus) 'Projects the makro action at the context menu item Call setMakro(zMenus) End Sub Sub setValue(Menus As ZenMenus) Dim zVar As Variable 'Variable for the set value function Dim Menu As ZenMenu 'Child object of ZenMenus Dim MenuItem As ZenMenuItem 'Child object of ZenMenu 'Select the main menu Set Menu = Menus.Item(0) 'Select the first main menu item Set MenuItem = Menu.Item(0) 'Object of variable "test" is assigned Set zVar = MyWorkspace.ActiveDocument.Variables.Item("test") 'Deactivate the submenus MenuItem.Popup = False 'Select set value as the action type of the menu item MenuItem.Type = tpVariable 'The variable of the set value function is assigned via Ids MenuItem.ActionID = zVar.PvID 'Set the "change by" value to 5 MenuItem.setValue = 5 End Sub Sub setMakro(Menus As ZenMenus) Dim zVar As Variable 'Variable for the set value function Dim Menu As ZenMenu Dim MenuItem As ZenMenuItem 'Select the context menu Set Menu = Menus.Item(1) 'Select the first context menu item Set MenuItem = Menu.Item(0) 'Deactivate the submenus MenuItem.Popup = False 'Select set value as the action type of the menu item MenuItem.Type = tpVbaMacro 'Set the Macro via the dynProperties MenuItem.DynProperties("VBA-Macro") = "Init_Default" End Sub