global proc radioDemo()
{
string $win = `window`;
rowColumnLayout -nc 1;
string $radioButtonsName = `radioButtonGrp -nrb 4 -label "LABEL" -la4 "first" "second" "third" "fourth" -vr -sl 3 -cw 1 75`;
button -label "CLICK HERE" -c ("printSelection "+$radioButtonsName);
showWindow $win;
}
proc printSelection(string $radioButtonsName)
{
int $selection = `radioButtonGrp -q -sl $radioButtonsName`;
print ($selection+"\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