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

Home » Public Forums » archive » Re: Retrieve content of Droplist
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: Retrieve content of Droplist [message #15289 is a reply to message #15288] Mon, 03 May 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Thomas C. Stubbings (stubbing@fbch.tuwien.ac.at ) writes:

> Although it may be trivial, I cannot manage to retrieve the currently
> selected value of a droplist (the online help of IDL is somehow a bad
> joke...). It is defined as follows:
>
> WID_DROPLIST_RULEWT = Widget_Droplist(WID_BASE_0, $
> UNAME='WID_DROPLIST_RULEWT' ,XOFFSET=4 ,YOFFSET=45 $
> ,SCR_XSIZE=135 ,SCR_YSIZE=23 ,TITLE='Fusion rule' ,VALUE=[ $
> 'average', 'waverage', 'maximum', 'minimum', 'himaximum', $
> 'hifirst', 'hisecond', 'hi/lo', 'lo/hi' ])

When you are in the business I'm in, this is what is known
as "good marketing", not a "bad joke". :-)

You can obtain the index number of the current
droplist selection like this. (I assume the droplist
identifier is in the "info" structure, and that the
droplist "values" are in the UVALUE of the droplist,
so they are handy.)

Widget_Control, info.droplistID, Get_UValue=dropValues
currentSelection = Widget_Info(info.droplistID, /Droplist_Select)
Print, dropValues[currrentSelection]

Cheers,

David

P.S. This is only about the 10th time I've answered this
question. I think I'll make a tip and put it on my web page.

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: FAQ Query Update
Next Topic: Re: IDL falls to sleep!

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

Current Time: Fri Oct 10 20:44:09 PDT 2025

Total time taken to generate the page: 0.16534 seconds