Determines if a given command is enabled.

Usage

Set_Property(OLECtrlEntID, "OLE.CommandEnabled[key]", Boolean)

Values

Boolean can be True or False.

Default: True

Indices

IndexDescription
keyThe target command's unique key

Remarks

The CommandEnabled property enables or disables all a given command's controls. When you defined the command during the Init method, you gave it a unique key. You must pass that key in order to enable or disable it. Since a command can be associated with any number of buttons, enabling or disabling a command affects all its buttons at once. This makes it much easier to manage common commands like SAVE or UNDO, which can often appear in multiple places on the ribbon.

Example

// Disable all save buttons at once
Set_Property(@Window:".OLE_RIBBON", "OLE.CommandEnabled[SAVE]", 0)

See Also

CommandCaption

  • No labels