PDA

View Full Version : Initalizing a Radio Button



green12
02-19-2009, 11:52 AM
When using WwRadioButton widget is there a way to have a radio button selected as default?

I have been trying to set the value of the radiobuttons but am having trouble.

This does not work....
status = WwSetValue(rbox, 1)




rbox = WwRadioBox(layout, choices, 'RadioCB', /OneOfMany, /AlignLeft,/Horizontal, Border=0, Spacing=2)

green12
02-20-2009, 12:40 PM
yes it does thank you.

also it is helpful for future searches to say
tgs is an array of all your radiobutton labels

so you can set certain buttons by:

st=WwSetValue(tgs(#), 1)

# is the element in the tgs array you desire to change.