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

Home » Public Forums » archive » Re: widget_droplist keyword problem
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_droplist keyword problem [message #8944 is a reply to message #8942] Wed, 07 May 1997 00:00 Go to previous message
Mike Schienle is currently offline  Mike Schienle
Messages: 37
Registered: May 1997
Member
Amara Graps wrote:

> I can't seem to get the SET_DROPLIST_SELECT keyword to work for my
> widget droplist.
...
> WIDGET_CONTROL, base, SET_DROPLIST_SELECT=1 ;Set the OFF
^^^^
I suspect your example actually tries to change the the droplist (list),
not the base (base), but the code you supplied seems to be doing
something else. What you supplied should work if you give it the ID of
the list. If it needs more than that let me know and I'll provide a
running example that works on my system. In the meantime, here's some
code that deals with two different droplists.

Here is some code from an event handler that runs on a few SGI's and a
couple of PowerMac's around here. The mChild and mLocal portions just
refer to elements within a structure. In this case, I get the droplist
selections for two different droplists; check if they are not equal;
then set the "plot" type to match the "correlation" type. The
[un]mapping is just to manage some items within a base which has no row
or column settings.

; get the plot panel plot type
lPDropVal = Widget_Info(mChild.wDropPlot, /DropList_Select)

; get the correlation panel plot type
lCDropVal = Widget_Info(mLocal.wDropPlot, /DropList_Select)

IF (lPDropVal NE lCDropVal) THEN BEGIN
; unmap the plot panel plot type
Widget_Control, mChild.awBasePlotType(lPDropVal), Map=0

; change plot panel plot type to
; correlation panel plot type
Widget_Control, mChild.wDropPlot, Set_DropList_Select=lCDropVal

; map the correlation panel plot type
Widget_Control, mChild.awBasePlotType(lCDropVal), Map=1
ENDIF

In the widget definition module below I do similar steps to make the
selected item of one droplist (wDropPlot) match the specified item of a
different droplist (mParent.wDropPlot). In the event handler section
above these are referred to as mChild and mLocal, respectively.

lDropVal = Widget_Info(mParent.wDropPlot, /DropList_Select)
wDropPlot = Widget_DropList(wBaseCommon, Title='Plot:', $
Value=mMisc.plotType)
Widget_Control, wDropPlot, Set_DropList_Select=lDropVal

mLocal = {wDropList: wDropList, ... }

Let me know if you need a better description or running code.

--
Mike Schienle Hughes STX - EROS Data Center, Sioux Falls, SD
Work: schienle@edcsgw13.cr.usgs.gov Home: mgs@sd.cybernex.net
[Message index]
 
Read Message
Read Message
Previous Topic: own function with equation
Next Topic: Map projection routine(s)

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

Current Time: Sun Oct 12 04:22:48 PDT 2025

Total time taken to generate the page: 1.52083 seconds