PDA

View Full Version : Tabed_Window?


fritz8th
05-13-2006, 04:25 PM
Hey everybody just had a simple question im messing with mel. What would I need to do to attach a maya window into my own custom made tabed window. Id like to have it to be on one of the tabs. So tab one could just be random buttons and then tab two could be say the attribute editor. Just not sure what I would need. Thanks for the help.

Dan

rokandic
05-13-2006, 04:59 PM
What you need is a 'tabLayout'. Check into docs, there's also an example.

-rok

fritz8th
05-13-2006, 05:30 PM
Hey sorry I made myself un clear I have my tabed window made already I just wasnt sure how to have when I click on one of the tabs to have a maya default window inside the tab area. Here is the code just simple stuff but on the seconed tab under hypergraph when you click on that tab I wanted the hypergraph to be open in that area of the tab . Thanks
Dan


CODE:

window -widthHeight 200 150;
string $form = `formLayout`;
string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5`;
formLayout -edit
-attachForm $tabs "top" 0
-attachForm $tabs "left" 0
-attachForm $tabs "bottom" 0
-attachForm $tabs "right" 0
$form;

string $child1 = `rowColumnLayout -numberOfColumns 2`;
text -label "name" ;
string $name = `textField `;

setParent ..;
string $child2 = `rowColumnLayout -numberOfColumns 2`;
setParent ..;
tabLayout -edit
-tabLabel $child1 "Buttons" -tabLabel $child2 "HyperGraph"
$tabs;

showWindow;

rokandic
05-13-2006, 06:49 PM
I hope I understand your problem correctly. You mean something like this?


window -widthHeight 200 150;
string $form = `formLayout`;
string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5`;
formLayout -edit
-attachForm $tabs "top" 0
-attachForm $tabs "left" 0
-attachForm $tabs "bottom" 0
-attachForm $tabs "right" 0
$form;

string $child1 = `rowColumnLayout -numberOfColumns 2`;
text -label "name" ;
string $name = `textField `;

setParent ..;
string $child2 = `formLayout -nd 100`;
string $hp1 = `hyperGraph -parent $child2`;
formLayout -edit
-af $hp1 "left" 0
-af $hp1 "right" 0
-af $hp1 "top" 0
-af $hp1 "bottom" 0
$child2;
setParent ..;
tabLayout -edit
-tabLabel $child1 "Buttons" -tabLabel $child2 "HyperGraph"
$tabs;

showWindow;

fritz8th
05-13-2006, 07:25 PM
Hey rokandic you got it. Sorry if I had trouble explaining it but thats just what I was looking for thanks for all the help.

Dan

CGTalk Moderation
05-13-2006, 07:25 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.