Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Two Column Layout
Two Column Layout [message #138101] Fri, 26 June 2009 04:36 Go to next message
Eclipse UserFriend
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 #138108 is a reply to message #138101] Fri, 26 June 2009 05:03 Go to previous messageGo to next message
Eclipse UserFriend
too quick answer: a Sash?
We made it like this
Re: Two Column Layout [message #138417 is a reply to message #138101] Fri, 26 June 2009 10:26 Go to previous messageGo to next message
Eclipse UserFriend
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 02:42 Go to previous message
Eclipse UserFriend
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
Previous Topic:Question about the RAP deployment, help!
Next Topic:Information on Menu set on CTabFolder or TabFolder
Goto Forum:
  


Current Time: Sat Jul 05 10:48:21 EDT 2025

Powered by FUDForum. Page generated in 0.48980 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top