IMenuItem

What it does

Represents a menu item.

Properties

Name Type Access Description
Command TCommandID Read-only

The command identifier. For a submenu title, CI_SubMenu is returned. For a separator, CI_Separator is returned.

If there is no identifier for a command among TCommandID values, CI_Undefined is returned.

Enable bool Read/write

Specifies whether to enable menu items.

If the property is set to false, all menu items with the specified identifier (the Command property) will be disabled.

If the property is set to true, enabling menu items depends on the internal logic of the program.

For separators and submenu titles, the property is always true.

Submenu IMenu Read-only The submenu. If a submenu is missing, null is returned.
Text string Read/write

The text of the menu item.

Note: The property does not allow changing text for the menu bar items: File, Edit, View, etc.

10.11.2020 12:08:04


Please leave your feedback about this article