Sign in Join
FPDoc Onlineexperiment

TMenuItem.Caption property

Member of TMenuItempublishedIn unit Menus

The caption text displayed for the menu item.

Declaration

pascal
property Caption: TTranslateString read FCaption write SetCaption stored IsCaptionStored;

Description

Caption is a TTranslateString property which contains the text displayed for the menu item. Caption can include a prefixed character which is used as the accelerator key for the menu item. Use the value in cHotkeyPrefix to identify the character used as accelerator for the menu item. The accelerator key is drawn at run-time using the style implemented for a specific widgetset; this generally involves highlighting and/or underlining the accelerator key.

For example:

AMenuItem.Caption := cHotkeyPrefix + 'Open'; // or
AMenuItem.Caption := '&Open';

Changing the value in the property causes the widgetset class to be notified when the Handle has been allocated and the Parent property is assigned.

See also

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