Xm18SortFunction

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Xm18SortFunction

Submitted by ooolongcha on Sun, 02/24/2002 - 04:01. Developers
Hello, newbie programmer here...
I`m really confused about how to use the XmNsortFunctions resource of the Ext18List widget. The manpage wasn`t very clear.. Do I write a single function for all the columns or one for each col.? Do I specify the function(s) to the widget using XtAddCallback or XtSetValues? Some code example would be very VERY appreciated )
Thank you!!

ICS_support

The function was constructed as an exact analog to the qsort() function. You have a single function which is repeatedly called with pairs of 18RowInfo* structures. Your function looks at those two pairs and returns -1, 0, or 1; you get to define what "less than", "equal", and "greater than" mean for the data that you are displaying. The widget takes the return value of the function to re-order the data; don`t use XtSetValues or anything else.