Vcl.StdCtrls.TButton.Default
Delphi
property Default;
C++
__property Default = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.StdCtrls.pas Vcl.StdCtrls.hpp |
Vcl.StdCtrls | TButton |
Description
Determines whether the button's OnClick event handler executes when the Enter key is pressed.
Vcl.StdCtrls.TButton.Default inherits from Vcl.StdCtrls.TCustomButton.Default. All content below this line refers to Vcl.StdCtrls.TCustomButton.Default.
Determines whether the button's OnClick event handler executes when the Enter key is pressed.
If Default is true, the button's OnClick event handler executes when the user presses Enter.
Although an application can have more than one Default button, the form calls the OnClick event handler only for the first visible button in the tab order. Moreover, any button that has focus becomes the Default button temporarily; hence, if the user selects another button before pressing Enter, the selected button's OnClick event handler executes instead.
See Also
Code Examples