[ By Archive-name
| By Author | By Category | By Newsgroup ]
[ Home | Latest Updates | Archive Stats | Search | Usenet References | Help ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
Top Document: Motif FAQ (Part 5 of 9)
Previous Document: 116) Can I have multi-line items in a list?
Next Document: 118) How can I configure a scrolled list widget to show a horizontal
[ Home | Latest Updates | Archive Stats | Search | Usenet References | Help ]
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
Top Document: Motif FAQ (Part 5 of 9)
Previous Document: 116) Can I have multi-line items in a list?
Next Document: 118) How can I configure a scrolled list widget to show a horizontal
117) How can I tell the position of selected items in a list?
[Last modified: Oct 92] Answer: W. Scott Meeks wrote: 1) All XmList selection callbacks get an XmListCallbackStruct which includes the item selected and its position. In addition, the multiple and extended selection callbacks also get a list of the selected items. This approach requires that your application saves this information if you need it outside of the immediate callback. 2) At any time you can XtGetValues the XmNselectedItems and XmNselectedItemCount resources. The problem with this approach is that identical items may or may not show up in multiple times in this list and the position in the selectedItems list may not relate directly to the position in the items list. 3) You can call XmListGetSelectedPos on the list widget. This will return a list of the positions of all selected items.
Top Document: Motif FAQ (Part 5 of 9)
Previous Document: 116) Can I have multi-line items in a list?
Next Document: 118) How can I configure a scrolled list widget to show a horizontal
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page
[ By Archive-name | By Author | By Category | By Newsgroup ]
[ Home | Latest Updates | Archive Stats | Search | Usenet References | Help ]
Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)
Last Update July 06 2008 @ 00:13 AM