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

Home » Public Forums » archive » Re: 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 #11932 is a reply to message #11930] Tue, 09 June 1998 00:00 Go to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Jonathan Rogness wrote:
>
> I'm building an interface to routines that I've written over the past
> couple of years, and after we upgraded to IDL 5.1 earlier this week I
> discovered I can now use the MULTIPLE keyword to WIDGET_LIST, which
> allows users to select more than one item in the list.
>
> Here's my problem: how can I tell which items have been selected? The
> index field of the Event structure is still a single number, not an
> array. Even if many items are selected, Event.Index is just the index
> of the /first/ selected item. Do I have to call widget_control? Out of
> curiosity I tried using the get_value keyword to widget_control, but it
> looks like that's still not an option with list widgets.
>
> My apologies if this is answered in the documentation. I only have
> printed manuals through version 5.0, and our online HyperHelp is causing
> my window manager to crash. (Hopefully RSI will fix that relatively
> soon.) I can see the documentation for WIDGET_LIST, which doesn't
> answer my question, but if I try to look up WIDGET_CONTROL, I end up
> having to restart my X-Server because of the crash.
>
> Thanks for any help -
>
> Jon

Just use:

list=widget_info(list_widget,/LIST_SELECT)

This will always return the current selected , or -1 if none selected.

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
Previous Topic: Upgrading from idl 3.6
Next Topic: Reading DXF files

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

Current Time: Wed Dec 03 01:56:41 PST 2025

Total time taken to generate the page: 1.11977 seconds