[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IDL listbox




Sorry if this is an obvious one, but I've been trying for too long now...

How do you get a list of all selected items from a widget_listbox?  I have
a listbox which I want to handle multiple selections.  I was originally
going to use the event handler: just toggle the settings of each item
which was clicked... but (at least in Unix) when you single click without
holding shift or control, all previous selections in a listbox are
de-selected.  I don't know how to keep track of which items are
de-selected like this.  (There doesn't seem to be an event for that.)

Another possibility was the OnSelectValue parameter to widget_listbox; I
created a procedure to remember if any given item was selected, but
again I have the problem that de-selection is not handled.

There ought to be an easy way, say from widget_control, to return an array
of indices which are selected at the moment, or something like that.  Why
can't I find such a thing??

Thanks in advance,
Stuart

----------------------------------------------------------------------
---                         Stuart Norton                          ---
---                       stuart@ucolick.org                       ---
---	Astronomy & Astrophysics  -  University of California      ---  
---			Santa Cruz, CA  95064                      ---
---			   (831) 459-4362                   	   ---
----------------------------------------------------------------------