guiListSetSelected (Function)

Top  Previous  Next

Architecture:

NX32L

Firmware version:

1.00.00


This function sets the index of the selected item in the list.

 

Input:

list : SYSHANDLE

The handle to the list to set the selection on.

 

index : INT

The index of the item to select.

 

 

Returns: INT

0

- Success

-1

- Interface is not open (see guiOpen).

-3

- Invalid handle or index.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiListSetSelected INT;
VAR_INPUT
   list  SYSHANDLE;
   index   INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
   rc     : INT;
   list   : SYSHANDLE;
   form   : SYSHANDLE;
END_VAR;
 
BEGIN
   ...
   // Select item 2
   rc := guiListSetSelected(list := listindex := 2);
   ...
END;
END_PROGRAM;