Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » PartSashContainer: Children(How to set the Childrens size?)
PartSashContainer: Children [message #552675] Fri, 13 August 2010 07:19 Go to next message
aRne  is currently offline aRne Friend
Messages: 5
Registered: August 2010
Junior Member
Hello,

I'm currently trying to create an application using the e4 Application Model. The problem I have there is the following:
If I define a PartSashContainer and it's children, I cannot set their size. The available space is always distributed equally among the children.

E.g. If there are two children in a vertical PartSashContainer, they take both 50% of the available height. But I want the upper one to take a fixed size and the other one should fill the rest.
Is there any way to do that?

Many thanks in advance,

aRne
Re: PartSashContainer: Children [message #552690 is a reply to message #552675] Fri, 13 August 2010 08:06 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Am 13.08.10 09:19, schrieb aRne:
> Hello,
>
> I'm currently trying to create an application using the e4 Application
> Model. The problem I have there is the following:
> If I define a PartSashContainer and it's children, I cannot set their
> size. The available space is always distributed equally among the children.
>
> E.g. If there are two children in a vertical PartSashContainer, they
> take both 50% of the available height. But I want the upper one to take
> a fixed size and the other one should fill the rest.
> Is there any way to do that?

The relative sizes are controlled by the containerData attribute of the
child (e.g. Part/PartStack). I don't think we yet have a story that
allows you to use absolute sizes so the only possibility is to write
your own SashContainerRenderer which uses a Composite as Container and a
GridLayout to replace it.

We are currently evaluating the possibility remove the use of SashForm
in 4.1 in [1] and I've added a comment so that we add fixed sizes as a
feature.

Tom

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=317849
Re: PartSashContainer: Children [message #552714 is a reply to message #552690] Fri, 13 August 2010 09:13 Go to previous messageGo to next message
aRne  is currently offline aRne Friend
Messages: 5
Registered: August 2010
Junior Member
Thank you for the clarification Tom,

you wrote that the containerData attribute of the
child controles its relative size. This attribute is just a String. Could you please give an example, how to set the relative size using this attribute?

thank you very much,

aRne
Re: PartSashContainer: Children [message #552721 is a reply to message #552714] Fri, 13 August 2010 09:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
PartSashContainer
Part(containerData=20)
Part(containerData=80)

The value is a weight (SashForm#setWeight(int[])) and if there are only
2 children this translates directly into percentages.

Tom

Am 13.08.10 11:13, schrieb aRne:
> Thank you for the clarification Tom,
>
> you wrote that the containerData attribute of the
> child controles its relative size. This attribute is just a String.
> Could you please give an example, how to set the relative size using
> this attribute?
>
> thank you very much,
>
> aRne
>
Re: PartSashContainer: Children [message #580750 is a reply to message #552690] Fri, 13 August 2010 09:13 Go to previous messageGo to next message
aRne  is currently offline aRne Friend
Messages: 5
Registered: August 2010
Junior Member
Thank you for the clarification Tom,

you wrote that the containerData attribute of the
child controles its relative size. This attribute is just a String. Could you please give an example, how to set the relative size using this attribute?

thank you very much,

aRne
Re: PartSashContainer: Children [message #580770 is a reply to message #552714] Fri, 13 August 2010 09:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
PartSashContainer
Part(containerData=20)
Part(containerData=80)

The value is a weight (SashForm#setWeight(int[])) and if there are only
2 children this translates directly into percentages.

Tom

Am 13.08.10 11:13, schrieb aRne:
> Thank you for the clarification Tom,
>
> you wrote that the containerData attribute of the
> child controles its relative size. This attribute is just a String.
> Could you please give an example, how to set the relative size using
> this attribute?
>
> thank you very much,
>
> aRne
>
Re: PartSashContainer: Children [message #902345 is a reply to message #552675] Fri, 17 August 2012 08:36 Go to previous messageGo to next message
tom maxx is currently offline tom maxxFriend
Messages: 20
Registered: July 2012
Junior Member
Is it possible to fix the size? I want to set the relative size of the parts and the user should not resize the parts.

Tom
Re: PartSashContainer: Children [message #902349 is a reply to message #902345] Fri, 17 August 2012 08:46 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Search for a feature request in bugzilla and if there's no create one.

Tom

Am 17.08.12 10:36, schrieb tom maxx:
> Is it possible to fix the size? I want to set the relative size of the
> parts and the user should not resize the parts.
> Tom
Previous Topic:XWTException by adding Listener to Button
Next Topic:Using a ListSelectionDialog in a E4 RCP Application
Goto Forum:
  


Current Time: Thu Apr 25 02:17:53 GMT 2024

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

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

Back to the top