Vcl.StdCtrls.TCustomButton.Default
Delphi
property Default: Boolean read FDefault write SetDefault default False;
C++
__property bool Default = {read=FDefault, write=SetDefault, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.StdCtrls.pas Vcl.StdCtrls.hpp |
Vcl.StdCtrls | TCustomButton |
Description
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