Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

​.ListIndex Dotfield

  • Last UpdatedNov 07, 2016
  • 1 minute read

Sets or reads the index (Tagname or Number) of the currently selected item in the list.

When using a list box, an index of -1 indicates that no item is currently selected.

When using a combo box, an index of -1 indicates that the user has typed new text into the text entry field of the control.

Syntax

[ErrorNumber=]GetPropertyI("ControlName.ListIndex", Tagname);

[ErrorNumber=]SetPropertyI("ControlName.ListIndex", Number);

Parameter

ControlName

Name of the windows control. For example, ListBox_4.

Tagname

The tagname to which the index of the currently selected item is written.

Number

The index number that defines a specific item in the list.

Remarks

The index number defines a specific item in a list. Use the .ListIndex dotfield to set or determine the index of the currently selected item in a list or combo box.

This property is available only in run time.

Data type

Integer (read or write)

Applies to

List boxes and combo boxes.

Example

This statement retrieves the index of the currently selected item in the list box named "ListBox_1" and writes that value to the memory integer tagname MyListBoxIndex.

GetPropertyI( "ListBox_1.ListIndex", MyListBoxIndex );

See Also

GetPropertyI(), SetPropertyI(), .NewIndex, .TopIndex

TitleResults for “How to create a CRG?”Also Available in