global proc radioOptions()
{
string $win = `window`;
rowColumnLayout -nc 1;
string $radioButtons = `radioButtonGrp -l "Select One" -nrb 4 -labelArray4 "One" "2" "C" "fourth" -vr -cw 1 80 -cw 2 200 -sl 1`;
button -l "Click" -c ("radioResult "+$radioButtons);
showWindow $win;
}
proc radioResult(string $radioButtons)
{
int $selection = `radioButtonGrp -q -sl $radioButtons`;
if ($selection == 2)
{
print "it's 2\n";
}
else
{
print "it's not 2\n";
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter