TCnButton.Default Property

Determines whether the button's OnClick event handler executes when the Enter key is pressed.

Namespace: CNClrLib.Control.Button
published
 property Default: Boolean read FDefault write SetDefault default False;

Property Value

Type: Boolean

 

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.