Constructor
new Command(propertiesopt)
Parameters:
| Name |
Type |
Attributes |
Description |
properties |
Object
|
<optional>
|
The properties used to initialize the object.
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
<optional>
|
|
Gets or sets the id of the command. The id is generated if it's not set. |
command |
String
|
function
|
<optional>
|
|
Gets or sets the command that the button triggers (e.g. 'undo', 'redo'). |
isVisible |
function
|
<optional>
|
|
Gets or sets a predicate function that returns true when this button should be shown. No value set means always visible. |
isEnabled |
function
|
<optional>
|
|
Gets or sets a predicate function that returns true when this button should be enabled; return false to disable it. No value set means always enabled. |
shortcutKey |
String
|
<optional>
|
|
Gets or sets the keyboard shortcut key in combination with the CTRL key for this button (e.g. 'z' for undo). |
cssClass |
String
|
<optional>
|
''
|
Gets or sets the CSS class name for the button. |
cssClassIcon |
String
|
<optional>
|
'ico-undo'
|
Gets or sets the CSS class name for the icon to display. |
events |
Object
|
<optional>
|
null
|
Gets or sets the events of the button component. |
buttonId |
String
|
null
|
<optional>
|
null
|
Gets or sets the id of the button component from which the settings are cloned. |
|
Members
Gets or sets the id of the button component from which the settings are cloned.
Type:
command :function|null
Gets or sets the command to execute.
Type:
cssClass :string
Gets or sets the CSS class name for the button.
Type:
cssClassIcon :string
Gets or sets the CSS class name for the icon to display.
Type:
events :Object|null
Gets or sets the events of the button component.
Type:
id :string|null
Gets or sets the id of the command. The id is generated if it's not set.
Type:
isEnabled :function|null
Gets or sets a predicate function that returns true when this button should be enabled; return false to disable it.
Type:
isVisible :function|null
Gets or sets a predicate function that returns true when this button should be shown.
Type:
location :Form.CommandLocationOption
Gets or sets the location of the command button.
Type:
-
Form.CommandLocationOption
shortcutKey :string
Gets or sets the keyboard shortcut key in combination with the CTRL key for this button (e.g. 'z' for undo).
Type: