NAME

cxInWdgtScrollListItemsSelSet - select and set a series of items in an list widget

C SPECIFICATION

#include <cx/UI.h>

void cxInWdgtScrollListItemsSelSet (char *portname, int numEntries, char *listEntriesString, int numSel, int *selArray)

FORTRAN SPECIFICATION

subroutine cxInWdgtScrollListItemsSelSet (portname, numEntries, listEntriesString)
character* portname, listEntriesString
integer numEntries

PARAMETERS

portname
This is the name of the input parameter port
numEntries
This is the number of list items in the list entry string
listEntriesString
This is a string of newline terminated substrings that make up the new list of items. "listEntriesString" should be a single null-terminated string composed of substrings representing each selected item in order. These substrings should be separated by newline characters "('\n')". The last substring should also have a terminating newline.
numSel
This is the number of list items in the selected list entry array
selArray
This an array of integers that represent indexes into the list of items; those indexed items are to be selected.

DESCRIPTION

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".

SEE ALSO

cxInWdgtScrollListItemsDelete(3E), cxInWdgtScrollListItemsInsert(3E), cxInWdgtScrollListItemsSel(3E), cxInWdgtScrollListItemsSet(3E)
Last modified: Wed Apr 23 16:25:18 1997
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996