TCustomCheckBox.Click procedure
Performs actions needed when the control is clicked.
Declaration
procedure Click; overrideDescription
Click is an overridden method in
TCustomCheckBox. It
performs actions needed when the value in the Checked or State property is
changed for the control, whether by mouse click or setting the value in
program code.
TCustomCheckBox re-implements the method from the TButtonControl ancestor to ignore the mouse click event. It has an empty implementation, and does not call the inherited method.
In TCustomCheckBox, the click action may be handled in two different ways. The action may be performed (in TControl) when the left mouse button is released and standard click events are enabled in ControlStyle. The click action may be performed in DoClickOnChange (by calling the inherited Click method) when the value in State is changed and ClicksDisabled is False.
This avoids a duplicate click notification when csClickEvents is enabled in ControlStyle and Click is handled when the WMLButtonUp method is executed, or when the click is triggered by an associated Action.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
