Re: widget_list in IDL 5.1 [message #11930] |
Tue, 09 June 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
J.D. Smith (jdsmith@astrosun.tn.cornell.edu) writes in
response to Jonathan Rogness' question about multiple
list widgets:
> Just use:
>
> list=widget_info(list_widget,/LIST_SELECT)
>
> This will always return the current selected , or -1 if none selected.
Yes, this certainly tells you which widget is selected, but
the problem I have is when to take action in a multiple list
selection, since I get an event in my event handler *every*
time a selection is made.
It seems I have several choices:
(1) Act on every event, which I normally don't like to do
at all.
(2) Guess when the user is finished, which results (believe me!)
in a lousy user interface.
(3) Write a compound widget with the list widget and an OK
button to let me know when the user *really* wants me to
respond to the selection event. But this is just like the
multiple selection widget I hacked up before the MULTIPLE
keyword was available.
What do some of the rest of you do? If we can get some
kind of consensus, I'll write an article about it for my
web page.
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|