comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » widget_list in IDL 5.1
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: widget_list in IDL 5.1 [message #12050 is a reply to message #11934] Fri, 12 June 1998 00:00 Go to previous messageGo to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
David Fanning wrote:
>
> 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.


I don't see how you could act on multiple selection events, David, since the
selection is never *over*. I can add a member to the selection list using
Control-Click (Apple-Click for Mac Users), or remove one from the selection too.
Since the user can take as many steps as he/she wants to define the multiple
selection, I don't understand your issue. The only obvious place for multiple
selection events would be when shift-selecting a range of list items, but how do we
know the user wouldn't rather Control-click them individually?

The only workable solution I see is number 3, or some variant. I.e. for multiple
widget lists, don't take any action which depends on the selected list when you
receive widget_list event. (Except maybe for double-clicks.)

JD

--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-4083
206 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: new book/software - multiscale image processing
Next Topic: odd behavior of loadct

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Dec 03 01:44:36 PST 2025

Total time taken to generate the page: 0.95661 seconds