You are here: Core Reference > Coding > Scripting > Form.AddPushButton

Form.AddPushButton

The AddPushButton function allows the script to add a selectable button to the Form.

Syntax

Form.AddPushButton(X, Y, Text)

Description

Adds a push button to a Form.

Arguments

X {integer}

Represents the horizontal position of the button on the Form—the position on the 'X-Axis' at which the button begins.

Y {integer}

Represents the vertical position of the button on the Form—the position on the 'Y-Axis' at which the button begins.

Text {string}

Defines the text that is shown on the push button.

Returns

Push Button Control Object

Push Button Control Objects have common Control Object Properties as well as their own specific properties that can be used in the script (see PushButton Properties).

Example:

Set SelectOption = Form.AddPushButton(2, 3, "Parameters")

This adds a button to the Form. The button has the word Parameters on it and it returns a Control Object that is stored in the SelectOption variable that is defined earlier in the script.


ClearSCADA 2015 R2