This function sets the value of an item in the list.
Input:
list : SYSHANDLE
The handle to the list to set the item in.
index : INT
The index of the item to set.
text : STRING
The text to show in the item.
Returns: INT
0
|
- Success.
|
-1
|
- Interface is not open (see guiOpen).
|
-3
|
- Invalid handle or index.
|
-8
|
- The text contains invalid characters.
|
-11
|
- The GUI API is not supported.
|
Declaration:
FUNCTION guiListSetItem : INT;
VAR_INPUT
list : SYSHANDLE;
index : INT;
text : STRING;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
rc : INT;
list : SYSHANDLE;
form : SYSHANDLE;
END_VAR;
BEGIN
...
rc := guiListCreate(list := list, form:=form, x:=1, y:=1, w:=5, h:=6, size := 10, type:=1);
rc := guiListSetItem(list := list, index:=1, text := "Item 1");
...
END;
END_PROGRAM;
|