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

ListBox.Count

The ListBox Control Object that is returned by the AddListBox function has a Count property. The Count property returns the number of entries in the List Box.

Syntax

ControlObject.Count

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

Allows the script to determine how many entries there are in the List Box (the number of options that the List Box contains).

Arguments

None.

Returns

Integer (the total number of entries in the List Box)

Example:

MsgBox.ListBox.Count

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).
  • This script causes a message box to be displayed—the message box contains the number that is returned by the Count property.

ClearSCADA 2015 R2