Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Two Column Layout
Two Column Layout [message #138101] Fri, 26 June 2009 08: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 09:03 Go to previous messageGo to next message
Aleksandar Pavlov is currently offline Aleksandar PavlovFriend
Messages: 79
Registered: July 2009
Member
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 14:26 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 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: Wed Dec 01 10:27:23 GMT 2021

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

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

Back to the top