PDA

View Full Version : frameLayout height and width donīt get the size I ask


shenmue
08-07-2008, 12:43 AM
Hi guys

I am having this problem.The height and width of the frameLayout donīt get the size I am writing.Lets take this code:


window -wh 500 300 -sizeable 0 mainWin;
frameLayout -l "parent" -li 5 -bs "etchedIn" -h 300 -w 300 -la "top" -lv 1 -mw 4 parent_fr;
frameLayout -li 95 -w 100 -h 100 -po 1 -l "child" -bs "etchedIn" -la "top" -mw 4 childFrame_fr;
showWindow mainWin;



and also the window getīs the size he wants....I donīunderstand.

flaiver
08-07-2008, 08:00 AM
Layout behaves sometimes very strange: a workaround is often to edit the Layout after creation:

e.g:

string $testLayout=`frameLayout `;
frameLayout -e -w 100 -h 200 $testLayout;


hope this helps

flaiver

NaughtyNathan
08-07-2008, 09:01 AM
you also have to understand that the sizing of certain controls is entirely dependant on it's parent's size and layout conditions and NOT the sizes you specify for it.. for example a frameLayout cannot display a child that doesn't fill it's entire size. if you wanted a frame layout that displayed children at smaller sizes or different positions you'd have to put a formLayout inside it (which would take up the full area) and then use this to specify sub-child sizes and positions.

:nathaN

shenmue
08-07-2008, 09:19 AM
ok.Thanks guys.It was driving me crazy.I am using formLayout and now it ok.
Thx

Dryden
08-07-2008, 03:27 PM
This kind of issue can come from the window preference stored in maya. Use :

windowPres -ra;
window -wh ...
...
showWindow;

CGTalk Moderation
08-07-2008, 03:27 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.