DwtListBoxSetItem(3Dwt)
Name
DwtListBoxSetItem − Makes a specified item (if it exists) the first visible item in a list box, or as close to the top as possible. The item always becomes visible.
Syntax
void DwtListBoxSetItem(widget, item)
Widget widget;
DwtCompString item;
Arguments
widgetSpecifies the widget ID.
itemSpecifies the item to be made the first item in the list box.
Description
The DwtListBoxSetItem function makes the specified item (if it exists) the first visible item in a list box. The function determines which item in the list box is displayed at the top of the list box, the choice of which is limited by the DwtNitemsCount and DwtNvisibleItemsCount attributes to the list box widget. When DwtNvisibleItemsCount is greater than 1 and less than DwtNitemsCount, the list box widget fills the list box with the maximum visible items regardless of the position value.
For example, if DwtNitemsCount is 10 and DwtNvisibleItemsCount is 5, you cannot make item 8 display at the top of the list box. Instead, items 6 through 10 would be displayed. Setting item to the fourth item in the list would make items 4 through 8 display. If DwtNvisibleItemsCount is 1, you can make any item in the list be displayed at the top of the list box.
See Also
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
Subroutines