[comp.windows.x.motif] XmScrolledList Selection from Code

glp@ibism.UUCP (Greg Parkinson) (12/14/90)

Sun SPARCStation, Motif 1.0.3

I am using a scrolled list with selectionPolicy set to EXTENDED_SELECT.
Works fine when using the mouse, but I also need to provide some fancier
selection functions based on the content of the list entries (the selection
is done from a menu.)

When I use XmListSelectPos, the selection behaves as a single select - each time
it is called on an item, it removes all other selections and leaves the last
one selected as the only one selected.  Not much good for when I want to select
all items.

I got it to work (mostly) by changing the selectionPolicy to MULTIPLE_SELECT
before doing the select, and then changing it back afterwards.  This seems
sort of wrong-headed to me - seems this should be an option on the selection
function.

Anyone have any experience with this, suggestions or comments?


-- 
Greg Parkinson               Phone:  212-657-7814
Citibank                     Fax:    212-657-0068
111 Wall Street              E-Mail: uunet!ibism!glp
New York, NY  10043