TCustomStaticText.ShowAccelChar property
Indicates if an accelerator character is drawn in the displayed text.
Declaration
property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar default True;Description
ShowAccelChar is a
Boolean property which indicates if
the character used as an accelerator key is drawn with an underline in the
control.
An accelerator is defined in Caption using a leading Ampersand
(&) character. The character immediately after the Ampersand character
sets the key value for the short cut. As an example: Setting Caption to
'&User Name' causes Alt+U to be used as the accelerator key. Any
occurrences of Ampersand (&) followed by a Space (#32) are not
displayed in the Caption value.
To display an Ampersand character in Caption, it must be entered as two adjacent Ampersand characters (&&).
Set ShowAccelChar to True to enable underline drawing for the
accelerator character. The default value for the property is True.
Changing the value in the property causes the
InvalidatePreferredSize method to be called to update the bounds
for the control.
The value in ShowAccelChar is used in widgetset class methods, such as when the text value is assigned and when the handle for the control is created (or re-created).
Use FocusControl to specify the control which receives focus when
the accelerator key is handled in DialogChar.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
