Sign in Join
FPDoc Onlineexperiment

TButtonControl.Click procedure

Member of TButtonControlprotectedIn unit StdCtrls

Performs actions needed when a click message is handled for the control.

Declaration

pascal
procedure Click; override

Description

Click is an overridden method in TButtonControl. Click calls the DoOnChange method which signals the OnEditingDone and OnChange event handlers (when assigned).

Click calls the inherited method prior to exit. The inherited method (in TControl) signals either the OnClick event handler or the OnExecute handler in the Action. OnClick is used when Action has not been assigned, or when OnClick contains a handler routine that differs from the one assigned to the OnExecute handler in the Action.

Click can be called in two different usage scenarios. If standard click events have been enabled in ControlStyle, it is called when the left mouse button is released. It can also be called from a private LM_CLICKED message handler in the control when standard click events are not enabled in ControlStyle. This avoids duplicate click notifications when csClickEvents is enabled in ControlStyle and Click is handled when the WMLButtonUp method is executed.

See also

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