PDA

View Full Version : rowLayout, make its all columns adjustable


alredha
03-17-2008, 10:17 PM
hello,

+---------------------------------+
| +------------------------------+ |
| | | | |
| | | | |
| +------------------------------+ |
+---------------------------------+

well,
something is driving me crazy,
rowLayout inside a columnLayout....nice

the rowLayout, i want to make its two columns adjustable, so we use this -adjustableColumn true or this : -adjustableColumn2 2? or 1 !!!
it seems that we can make only one column adjustable, either the first or the second...so! any help?

Buexe
03-17-2008, 11:36 PM
AFAIK you can only specify one column to be adjustable. If this doesn`t fit your purposes maybe you can use some controls in a formLayout, because a formLayout has the ability to position his children relative to the size ( percentage ). I hope you can understand what I mean, I think there is an example in the formLayout documentation.

alredha
03-18-2008, 09:29 AM
thank you for the answer,

yes, i know how to work with formLayout, but what i understand from you is that the use of columnLayout and rowLayout is limited, right? so i must change them with formLayout...

unsmoothed
03-18-2008, 11:06 AM
Hi.. columnLayout is just one column that all other controls and layouts sit under. The `-adj 1` flag will make the direct children of the columnLayout stretch to fit the width of the layout. With rowLayout, you need to specify the widths of each column in the rowLayout. Unfortunately the children of the rowLayout wont stretch to fit the columnLayout...

Have a look at this. By resizing the window, you can see how the columns work. Try changing the '-adj 1' to 'adj 0' and see what happens to the first button control. It's a shame the rowLayout doesn't stretch.


window -t "columnLayout test" ui_window;
frameLayout -lv 0;
columnLayout -adj 1;
button -l "In the columnLayout";
rowLayout -nc 2;
button -l "In the rowLayout";
button -l "In the rowLayout";

showWindow ui_window;


Hope that helps.
cheers,
-uN

alredha
03-19-2008, 02:27 PM
thanks unsmoothed, i only nested the formLayout in a columnLayout, it works good....

fine :)

CGTalk Moderation
03-19-2008, 02: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.