Message 1 of 2
Radiobuttons -en false and then set to true?

Not applicable
01-27-2012
01:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi,
i am trying to set up a UI that has 2 sets of radioCollections. depending on the state of the first set, the second will become enabled or not.
cant get the second set to become enabled. here is the code:
thanks
-a
i am trying to set up a UI that has 2 sets of radioCollections. depending on the state of the first set, the second will become enabled or not.
cant get the second set to become enabled. here is the code:
{
window;
columnLayout;
// create the first radio collection
$radio1 = `radioCollection`;
// add some radio buttons to the collection
$off = `radioButton -label "Off" -onc "updateradio(0)"`;
$on = `radioButton -label "On" -onc "updateradio(1)"`;
separator -w 50 -style "single";
// create the second radio collection
$radio2 = `radioCollection`;
// add some radio buttons to the collection
$X = `radioButton -label "X" -en false`;
$Y = `radioButton -label "Y" -en false`;
$Z = `radioButton -label "Z" -en false`;
// edit the radio collections to set the required radio button
radioCollection -edit -select $off $radio1;
proc updateradio(int $arg) {
if($arg){
radioButton -en true $X;
radioCollection -edit -select $X $radio2;
}
}
// now show the window
showWindow;
}
thanks
-a