Home » Eclipse Projects » Remote Application Platform (RAP) » Two Column Layout
Two Column Layout [message #138101] |
Fri, 26 June 2009 08:36 |
Eclipse User |
|
|
|
Originally posted by: joerg.sandkuhle.syncomnet.com
Hi all,
whats the best way to make a two column layout? Say i have a wrapper
composite. On the left side should be the menu (fixes width, height of
wrapper), on the right side the content (fill remain width, height of
wrapper).
I´m looking for something like this (pseudo code):
Composite wrapper = new Composite(...);
wrapper.setLayout(new RowLayout(SWT.HORIZONTAL);
Composite menu = new Composite(wrapper,SWT.NONE);
RowData layoutData = new RowData(200,"100%");
menu.setLayoutData(layoutData);
Composite content = new Composite(wrapper,SWT.NONE);
RowData layoutData = new RowData("100%","100%");
content.setLayoutData(layoutData);
Thanks for your help!
Jörg
|
|
| |
Re: Two Column Layout [message #138417 is a reply to message #138101] |
Fri, 26 June 2009 14:26 |
|
Hi Jörg,
you can use a two-column GridLayout, set fixed width GridData on the
first child and let the second one take all remaining space using
GridData( SWT.FILL, SWT.FILL, true, true ).
If you have further questions on SWT layouts, please read this article
[1] and consider asking on the SWT newsgroup.
Ralf
[1]
http://www.eclipse.org/articles/article.php?file=Article-Und erstanding-Layouts/index.html
Jörg Sandkuhle wrote:
> Hi all,
>
> whats the best way to make a two column layout? Say i have a wrapper
> composite. On the left side should be the menu (fixes width, height of
> wrapper), on the right side the content (fill remain width, height of
> wrapper).
>
> I´m looking for something like this (pseudo code):
>
> Composite wrapper = new Composite(...);
> wrapper.setLayout(new RowLayout(SWT.HORIZONTAL);
>
> Composite menu = new Composite(wrapper,SWT.NONE);
> RowData layoutData = new RowData(200,"100%");
> menu.setLayoutData(layoutData);
>
> Composite content = new Composite(wrapper,SWT.NONE);
> RowData layoutData = new RowData("100%","100%");
> content.setLayoutData(layoutData);
>
> Thanks for your help!
>
> Jörg
|
|
|
Re: Two Column Layout [message #138484 is a reply to message #138417] |
Sun, 28 June 2009 06:42 |
Eclipse User |
|
|
|
Originally posted by: joerg.sandkuhle.syncomnet.com
Ralf Sternberg schrieb:
> Hi Jörg,
>
> you can use a two-column GridLayout, set fixed width GridData on the
> first child and let the second one take all remaining space using
> GridData( SWT.FILL, SWT.FILL, true, true ).
>
> If you have further questions on SWT layouts, please read this article
> [1] and consider asking on the SWT newsgroup.
>
> Ralf
>
> [1]
> http://www.eclipse.org/articles/article.php?file=Article-Und erstanding-Layouts/index.html
>
>
> Jörg Sandkuhle wrote:
>> Hi all,
>>
>> whats the best way to make a two column layout? Say i have a wrapper
>> composite. On the left side should be the menu (fixes width, height of
>> wrapper), on the right side the content (fill remain width, height of
>> wrapper).
>>
>> I´m looking for something like this (pseudo code):
>>
>> Composite wrapper = new Composite(...);
>> wrapper.setLayout(new RowLayout(SWT.HORIZONTAL);
>>
>> Composite menu = new Composite(wrapper,SWT.NONE);
>> RowData layoutData = new RowData(200,"100%");
>> menu.setLayoutData(layoutData);
>>
>> Composite content = new Composite(wrapper,SWT.NONE);
>> RowData layoutData = new RowData("100%","100%");
>> content.setLayoutData(layoutData);
>>
>> Thanks for your help!
>>
>> Jörg
Aleksandar, Ralf,
thanks for your help!
Jörg
|
|
|
Goto Forum:
Current Time: Thu Apr 25 13:05:35 GMT 2024
Powered by FUDForum. Page generated in 0.03899 seconds
|