#include <cx/UI.h>void cxInWdgtScrollListItemsSelSet (char *portname, int numEntries, char *listEntriesString, int numSel, int *selArray)
subroutine cxInWdgtScrollListItemsSelSet (portname, numEntries, listEntriesString) character* portname, listEntriesString integer numEntries
This is the IRIS Explorer Widget Library call used to assign a series of items to an IRIS Explorer Scrolled List widget, and select some or all of them. Any items in the scrolled list widget prior to the call are deleted, then a new list of items from the character string "listEntriesString" are inserted in order.
The item indexing scheme is 1 based, so the to select the first element in the array, used the index 1. Out of bounds indices will be ignored.
Sample module call:
int *selArray; selArray = calloc(2, sizeof(int)); selArray[0] = 1; selArray[1] = 2; cxInWdgtScrollListItemsSelSet ( "Name List", 3, "Item 1\nItem 2\nItem 3\n", 2, selArray );
This would result in deleting any prior list items, and adding list "Name List" with 3 list items, "Item 1", "Item 2" and "Item 3". The list items "Item 1" and "Item 2" also would be selected. The parameter value for that widget is the string "Item 1\nItem 2\n".