Vcl.Controls.TControl.Click
Delphi
procedure Click; dynamic;
C++
DYNAMIC void __fastcall Click();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
Respond to user click.
Click is called automatically when the user left-clicks the control. Component or application code can call Click to simulate a user mouse click. This is often done in menu actions and hotkey handlers.
As implemented in TControl, Click queries whether the OnClick event handler exists and is different from the OnExecute handler for the control's Action. If this is true, the OnClick event handler is called. If this is false, and the Action OnExecute event handler exists, the Action's Execute method is called. Override Click to provide additional behavior.