Dynamic Items
This section adds new menu items to the context menu.
Dynamic items have three types (menu, item, and separator). with properties to add new items with customization explained below in more details.
The types (menu and item) must contain the property title at least and their value cannot be null.
A separator-type item can be added without any properties.
In the following example, it shows how to write add an items to dynamic:
shell
{
dynamic
{
item(title = 'Hello, World!')
separtor
menu(title = 'sub menu' image = #0000ff)
{
item(title = 'test subitem')
}
}
}
Properties
Property | Summary | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Where | Allow menu item to be passed if a true value is returned Default = true |
||||||||||||||||||||||||||||||||
Title | Sets a value indicating the caption of the menuitem. This property must be included with menu and item if image propery is not defined, not required for separator. Default = nullRequired for menu, item. |
||||||||||||||||||||||||||||||||
Mode | Accept item by selections behavior. Value have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
Type | Specify the types of object files allowed for the menu item to appear. The property is assigned to one or more of these parameters and this character | is used to separate types.Add a character ~ before single type to exclude.
The property not supported syntax expressions.
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
Visibility (vis) | Visibility of menuitem and can have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
Find |
Accept menuitem when the specified path name or path extension is contains or equal to the current find property. Syntax find = 'exe' Find any word contains "exe" find = '"exe"' Match whole word only find = '*exe' Find a word that ends with find = 'exe*' Find a word that starts with find = '!exe' Find any word not contains "exe" find = '!"exe"' Search for any word not equal to "exe" find = '!*exe' Find a word that not ends with find = 'exe*!' Find a word that starts with find = '.exe' Find an equal extension for ".exe" find = '!.exe' Find an not equal extension for ".exe" find = '.exe|.dll' Find an equal extension for ".exe" or ".dll" |
||||||||||||||||||||||||||||||||
Separator (sep) | Add separator with menuitem position by parameters:
Required for menu, item. |
||||||||||||||||||||||||||||||||
Position (pos) | The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters:
Required for menu, item, separator. |
||||||||||||||||||||||||||||||||
Image, Icon | The icon that appears in a menuitem, This property can be assigned as image files, resource icons, glyph or color. With one of the following parameters
Required for menu, item. |
||||||||||||||||||||||||||||||||
Parent, Menu | Move current item to another menu. Default = null |
||||||||||||||||||||||||||||||||
Command (cmd) | The command associated with the menuitem. Occurs when the menuitem is clicked or selected using a shortcut key or access key defined for the menuitem. Default = nullRequired for item. |
||||||||||||||||||||||||||||||||
Arguments (arg, args) | The parameter to pass to the Command property of a menuitem. Default = nullRequired for item. |
||||||||||||||||||||||||||||||||
Invoke | Set execution type
Required for item. |
||||||||||||||||||||||||||||||||
Window | Controls how the window is to be shown. can be one of the following parameters:
Hidden, Show, Visible, Minimized, Maximized Default = showRequired for item. |
||||||||||||||||||||||||||||||||
Directory (dir) | Specify the work directory to execute the command. Default = nullRequired for item. |
||||||||||||||||||||||||||||||||
Admin | Execute the command with administrative permissions. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
Verb | Specifies that the operation is the default for the selected file. value type string and can have one of the following parameters:
Required for item. |
||||||||||||||||||||||||||||||||
Wait |
Waiting Until end of command. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
Checked | Value that indicates whether the menuitem checked type:
Required for item. |
||||||||||||||||||||||||||||||||
Default |
Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold. Default = falseRequired for item. |
||||||||||||||||||||||||||||||||
Expanded |
Move items to the parent item. Default = falseRequired for menu. |
||||||||||||||||||||||||||||||||
Column(col) | Create a new column. Default = trueRequired for item, menu. | ||||||||||||||||||||||||||||||||
Keys | Show keyboard shortcuts. Default = null |
||||||||||||||||||||||||||||||||
Tip |
Show a tip for the current item Default = nullSyntax
|
This page is open source.
Noticed a typo? Or something unclear?
Improve this page on GitHub