Sign in Join
FPDoc Onlineexperiment

TCustomButton.WSSetText procedure

Member of TCustomButtonprotectedIn unit StdCtrls

Notifies the widgetset class of a change to the caption text for the control.

Declaration

pascal
procedure WSSetText(const AText: string); override

Arguments

AText

New value for the caption text in the control.

Description

WSSetText is an overridden method used to notify the widgetset class instance when the value in the caption text has been changed. No actions are performed in the method when the handle for the control has not been allocated, or at design-time.

WSSetText ensures that Ampersand (&) characters used to define an accelerator key in AText are handled for the widgetset class. The Ampersand character(s) are removed from AText, and the virtual key code equivalent is stored in the Shortcut property. By default, the Shortcut uses the ssAlt shift modifier for the accelerator key.

The SetShortCut method in the widgetset class is called to store values from both Shortcut and ShortCutKey2.

The inherited WSSetText method is called prior to exit.

See also

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