You are here: Core Reference > Coding > Scripting > PushButton.Default

PushButton.Default

The PushButton Control Object that is returned by the AddPushButton function has a Default property. The Default property allows the push button to be selected by pressing the Enter key (this is dependant on the Default property being set to True and no other buttons being set to True).

Syntax

ControlObject.Default = Value

Where ControlObject. is the name of the variable (declared in your script) that is used to store the PushButton Control Object that is returned by the AddPushButton function.

Description

Sets the default property setting of the Push Button. This can be True or False.

If there are multiple Push Buttons with a True default setting, pressing the Enter key will select the Push Button that was most recently set to have a True default setting.

Arguments

Value {Boolean}

If set to True (1), the Push Button is set to True and will be 'pressed' when the user presses the Enter key (unless other Push Buttons are also set to True, in which case, the Enter key will activate the Push Button that has most recently been set to True). If the Push Button is set to False (0), it will not be affected by a user pressing the Enter key.

Returns

Boolean

Example:

PushButton1.Default = 1

Where:

  • PushButton1 is the name of the variable that stores the PushButton Control Object returned by the AddPushButton function
  • 1 sets the Push Button to True. When a user presses the Enter key, the Push Button is selected (unless another Push Button has been set to True more recently).

ClearSCADA 2015 R2