Vcl.Menus.TMenuItem.Caption

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Caption: string read FCaption write SetCaption stored IsCaptionStored;

C++

__property System::UnicodeString Caption = {read=FCaption, write=SetCaption, stored=IsCaptionStored};

Properties

Type Visibility Source Unit Parent
property published
Vcl.Menus.pas
Vcl.Menus.hpp
Vcl.Menus TMenuItem

Description

Specifies the text of the menu item.

Set Caption to the string the user sees for this item in the menu. To underline a character in a string, include an ampersand (&) before the character. This type of character is called an accelerator character. If Caption includes an accelerator character, the user can select the menu item by pressing Alt while typing the underlined character.

Tip: To automatically assign or adjust the accelerator characters in menu item captions, use the RethinkHotkeys method.

Use the Caption property to identify the menu item as a line that separates the menu into parts. Specify a hyphen character (-) as the value of Caption for the menu item to indicate that the menu item is a separator. To separate the menu into multiple columns, use the Break property instead.

Note: This property is not stored with the menu item if it is supplied by a TAction object.

See Also

Code Examples