Sign in Join
FPDoc Onlineexperiment

TToolButton.MenuItem property

Member of TToolButtonpublishedIn unit ComCtrls

Contains a menu item associated with the tool button.

Declaration

pascal
property MenuItem: TMenuItem read FMenuItem write SetMenuItem;

Description

MenuItem is a TMenuItem property which contains a menu item associated with the tool button.

Normally, a button on an application tool bar is associated with a menu item in the application. When a TMenuItem instance is assigned to the property, its property values are copied into the TToolButton instance using the CopyPropertiesFromMenuItem method. If MenuItem is set to Nil, a free notification is performed for the tool button instance.

When MenuItem has sub-menu Items, they are displayed as a drop-down when the tool button uses a drop-down Style.

Use DropDownMenu to specify a TPopupMenu instance that is displayed when the button (or drop-down indicator) for the tool button is clicked.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.