Next: list.c program Up: List Widgets Previous: List Enquiry

List Callbacks

There is a List Callback resource for each of the selection types (e.g. XmNsingleSelectionCallback and also a XmNdefaultActionCallback.

The selection policy Callback will be called first and the the default.

A list item may action a callback by double clicking on his selection.

The Callback function has the usual form:

list_cbk(Widget w, XtPointer data, XmListCallbackStruct *cbk)

Element of the XmListCallbackStruct that may be of use include:

item
- the XmString of selection.
item_position
- position in List.
selected_items
- list of XmStrings in multiple selections.
selected_item_count
- number of multiple selections.
selected_item_positions
- positions in list.

See reference manuals or <Xm/List.h> for complete details.


Dave.Marshall@cm.cf.ac.uk
Tue May 24 16:52:56 BST 1994