PDA

View Full Version : TabL, ScrollL, FrameL, RowL in same window ?


safakoner
09-20-2003, 04:28 PM
Hi all

I am creating a custom ui included character animaiton controls for my character. But I have a problem. :buttrock: I want to create my script ui like this

Window;
Tablayout ( Tab 1 )
Scrolllayout
Framelayout
RowLayout
Sliders
Buttons
Tablayout ( Tab 2 )
Scrolllayout
Framelayout
RowLayout
Sliders
Buttons
showWindow;

I can't create Tablayout, Scrolllayout , Framelayout, RowLayout in same window. How can I create it in same window ? Can you help me ?

My script :

//---------------------------------------------------------------------------
if (`window -q -exists sdk`) deleteUI sdk;
window -w 450 -h 350 -menuBar true -title "TI.CCP R1" sdk;
//----------------------------------------------------------------------------------


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 = `columnLayout `;

frameLayout -l "ahas" -cll true -h 178 -w 425;
rowColumnLayout -nc 6 -width 360 -cw 1 75 -cw 2 25 -cw 3 25 -cw 4 240 -cw 5 25 -cw 6 25 R_Wrist_Row1;
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 L_Wrist_T; connectControl L_Wrist_T aha.ry;
button -label "R" -w 20 -command "sk_lwt";
button -label "C" -w 20 -command "dk_lwt";
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 rist_T; connectControl rist_T aha.ry;
setParent ..;
setParent ..;

frameLayout -l "ahas" -cll true -h 178 -w 510;
rowColumnLayout -nc 4 -width 360 -cw 1 50 -cw 2 30 -cw 3 30 -cw 4 240 R_Wrist_Row1;
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 L_Wrist_T; connectControl L_Wrist_T aha.ry;
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 rist_T; connectControl rist_T aha.ry;
setParent ..;
setParent ..;
setParent ..;


string $child2 = `columnLayout `;

frameLayout -l "ahas" -cll true -h 178 -w 510;
rowColumnLayout -nc 4 -width 360 -cw 1 50 -cw 2 30 -cw 3 30 -cw 4 240 R_Wrist_Row1;
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 L_Wrist_T; connectControl L_Wrist_T aha.ry;
text -label " Wrist T";
button -label "S" -w 20 -command "sk_lwt";
button -label "D" -w 20 -command "dk_lwt";
floatSliderGrp -min 0 -max 10 -field true -width 30 rist_T; connectControl rist_T aha.ry;
setParent ..;
setParent ..;



//----------------------------------------------------------------------------------

tabLayout -edit
-tabLabel $child1 "One"
-tabLabel $child2 "Two"
$tabs;

//----------------------------------------------------------------------------------

showWindow sdk;

//----------------------------------------------------------------------------------


thanks

mhovland
09-20-2003, 06:02 PM
I didn't run your code, but I would assume it is a parenting issue. Here is some code I was playing with to try and set up a crazy interface.

I'm attaching a zip file because the formatting is important to seeing the parenting relationships. Hope it helps.

ajk48n
09-20-2003, 06:56 PM
The order you enter the layouts should be like this:

$win = `window`;
$form = `formLayout`;
$tab1 = `tabLayout`;

formLayout -edit
-attachForm $tab1 "top" 0
-attachForm $tab1 "left" 0
-attachForm $tab1 "bottom" 0
-attachForm $tab1 "right" 0
$form;

$scroll1 = `scrollLayout`;
$frame1 = `frameLayout -cll 1 -w 100`;
$row1 = `rowLayout -numberOfColumns 3`;
//put Sliders and Buttons in now

setParent $tab1;
$scroll2 = `scrollLayout`;
$frame2 = `frameLayout -cll 1 -w 200`;
$row2 = `rowLayout`;
//put Sliders and Buttons in now

tabLayout -edit
-tabLabel $scroll1 "One ScrollLayout" -tabLabel $scroll2 "Two ScrollLayout"
$tab1;

showWindow $win;




Your code seems to work, what's the problem you're having with it?

safakoner
09-20-2003, 08:29 PM
I can't create Tablayout, Scrolllayout , Framelayout, RowLayout in same window. my code is working but without scrollLayout and your code is working perfect for me :)

thanks a lot

CGTalk Moderation
01-16-2006, 04:09 AM
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.