Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Pymel tabLayout() creating empty tab
  RSS 2.0 ATOM  

Pymel tabLayout() creating empty tab
Rate this thread
 
55487
 
Permlink of this thread  
avatar
  • Total Posts: 13
  • Joined: 03 March 2008 08:58 PM

I’m having some issues with the tabLayout command specifically in this script

myWindow=window()
myTabLayout=tabLayout()
tabChildOneLayout=columnLayout()
with tabChildOneLayout:
button()
tabChildTwoLayout=columnLayout()
with tabChildTwoLayout:
button()
tabLayout(myTabLayout,edit=True,tabLabel=((tabChildOneLayout,"Tab One"),(tabChildTwoLayout,"Tab Two")))
showWindow(myWindow)

It creates the proper tabs for the children layouts but it is creating a tab before the other 2 with no name and nothing in it. How do I get rid of the tab or am I doing something wrong to cause it to appear?

Thanks for the help ahead of time!



Replies: 0
avatar

Update 15 minuets later:

Okay got it to work but I cant set the tab name until after everything is setup. I have to edit the tab after creating it to name the tabs.

myWindow=window()
mainLayout=columnLayout()
with mainLayout:
 
myTabLayout=tabLayout()
 
with myTabLayout:
     
tabOneLayout=columnLayout(ann="tabOne")
     
with tabOneLayout:
         
buttonOne=button()
     
tabTwoLayout=columnLayout()
     
with tabTwoLayout:
         
buttonTwo=button()
tabLayout(myTabLayout,edit=True,tabLabel=((tabOneLayout,"tabOne"),(tabTwoLayout,"tabTwo")))
showWindow(myWindow)

Is there a way to set the tabLabel during the creation not editing it after?



Replies: 0