You are here: Core Reference > Coding > Scripting > ListBox.Add

ListBox.Add

The ListBox Control Object that is returned by the AddListBox function has an Add function. The Add function can be used to add an entry to the List Box.

Syntax

ControlObject.Add(Text)

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

Description

Adds an option to the List Box. The option that is added is allocated the next Index Number, so if the last option in the List Box had 6 as its Index Number, the option that is added by the Insert function would be allocated an Index Number of 7.

Arguments

Text {string}

The text that is shown for the option in the List Box.

Returns

String

Example:

ListBox.Add("Point Alg1")

Where:

  • ListBox is the name of the variable used to store the List Box Control Object that is returned by the AddListBox function (which would be defined earlier in the script)
  • "Point Alg1" is the name of the option that is being added to the List Box.

ClearSCADA 2015 R2