In the following example, the list widget shown at right is created with its selection policy set to XmSINGLESELECT. A single selection callback is added, to correspond with the selection policy.
The call data of the singleSelection callback specifies the item that was selected. The callback method below prints the entire callback data on the transcript. All components of the call data can be retrieved using the corresponding accessor method.
|