ph2003
01-18-2009, 02:58 PM
hi folks,
can any1 tell me wats wrong with this "setParent" code i did?
with this code i was unable to add shelfbutton into the shelftablayout :shrug:
if (`window -ex AC_ControlWindow`)
{
deleteUI AC_ControlWindow;
}
window -wh 400 200 -rtf 0 AC_ControlWindow;
string $mainForm = `tabLayout -innerMarginWidth 0 -innerMarginHeight 0 mainForm`;
string $colLayout3 = `columnLayout Faces`;
formLayout uiForm;
string $baseCol = `columnLayout`;
formLayout charControl;
setParent mainForm;
string $tabs = `shelfTabLayout "Presets"`;
string $shelf = `shelfLayout "Body Presets"`;
string $radioButton1;
radioCollection;
$radioButton1 = `button -label "Save" -command "save"`;
setParent mainForm;
showWindow AC_ControlWindow;
global proc save()
{
shelfButton -image1 "commandButton.xpm" -command "select -all";
}
if i remove the line20 "setParent mainForm;"
i was able to add shelf into it, but i wont able to add more shelftabs w/o using the "setParent" (theres 3 more tabs i will add later for faces and fingers presets)
im sorry that this was a simple question, im still learning about building UI atm :sad:
thank you!
can any1 tell me wats wrong with this "setParent" code i did?
with this code i was unable to add shelfbutton into the shelftablayout :shrug:
if (`window -ex AC_ControlWindow`)
{
deleteUI AC_ControlWindow;
}
window -wh 400 200 -rtf 0 AC_ControlWindow;
string $mainForm = `tabLayout -innerMarginWidth 0 -innerMarginHeight 0 mainForm`;
string $colLayout3 = `columnLayout Faces`;
formLayout uiForm;
string $baseCol = `columnLayout`;
formLayout charControl;
setParent mainForm;
string $tabs = `shelfTabLayout "Presets"`;
string $shelf = `shelfLayout "Body Presets"`;
string $radioButton1;
radioCollection;
$radioButton1 = `button -label "Save" -command "save"`;
setParent mainForm;
showWindow AC_ControlWindow;
global proc save()
{
shelfButton -image1 "commandButton.xpm" -command "select -all";
}
if i remove the line20 "setParent mainForm;"
i was able to add shelf into it, but i wont able to add more shelftabs w/o using the "setParent" (theres 3 more tabs i will add later for faces and fingers presets)
im sorry that this was a simple question, im still learning about building UI atm :sad:
thank you!
