Re: Xmenu [message #1792] |
Tue, 25 January 1994 02:05 |
sjt
Messages: 72 Registered: November 1993
|
Member |
|
|
In article <SCOLLICK.94Jan24165353@skview.gsfc.nasa.gov>, scollick@skview.gsfc.nasa.gov (Keith A. Scollick) writes:
|> Hi,
|> I have a simple question that has been baffling me for a week
|> or so. I use the XMENU widget to provide a list of parameters
|> that can be choosen. What I want to do is provide a default
|> setup meaning I want some of the buttons already on the "on"
|> position when I create the menu. Is there a way to do this?
|> I can only seem to get the buttons to come up in the "off" position.
|>
|> I am using IDL 3.5.1 on an Alpha OSF/1 machine.
|>
|> Thanks for any help,
|> --Keith A. Scollick
|> scollick@skview.gsfc.nasa.gov
I've not tried IDL 3.5 nor IDL on an Alpha, but in 3.1 on Solaris and VMS then (and here I assume you are working with a /NONEXCLUSIVE menu) the following works:
instat = [0b,1b,0b,1b]
labels=["B1","B2","B3","B4"]
Xmenu, labels, base, /nonexclusive, buttons=buts
for j = 0, n_elements(labels)-1 do widget_control, buts(j), set_button=instat(j)
This will have "B2" and "B4" set and "B1" and "B3" unset.
--
James Tappin, School of Physics & Space Research
University of Birmingham
|
|
|