[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'StdCtrls' (#lcl)

# TButtonControl.Click

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

## Declaration

Source position: stdctrls.pp line 1189

`protected procedure TButtonControl.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

TButtonControl.DoOnChange |  | Signals the OnEditingDone and OnChange event handlers (when assigned).
TButtonControl.OnChange |  | Event handler signalled when the button control is clicked.
TControl.Click |  | Signals OnClick and/or executes the ActionLink when the control has been clicked.
TControl.Action |  | The Action associated with the control.
TControl.OnEditingDone |  | Event handler signalled when editing is completed for the control.
TControl.WMLButtonUp |  | Message handler for left mouse button up events.
TControl.ControlStyle |  | Contains style flags which control the features or behaviors enabled for the control.
TControl.ControlState |  | Contains state flags which indicate whether the control has been clicked, data is being read, or the control is being re-drawn, etc.
LM_CLICKED |  |
TBasicAction.OnExecute