[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TToolButton.MenuItem

Contains a menu item associated with the tool button.

## Declaration

Source position: comctrls.pp line 2210

`published property TToolButton.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.