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 03:19 Go to next message
aRne  is currently offline aRne
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 04:06 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5256
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 05:13 Go to previous messageGo to next message
aRne  is currently offline aRne
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 05:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5256
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 05:13 Go to previous messageGo to next message
aRne  is currently offline aRne
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 05:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5256
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 04:36 Go to previous messageGo to next message
tom maxx is currently offline tom maxx
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 04:46 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5256
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: Tue Jul 29 21:11:59 EDT 2014

Powered by FUDForum. Page generated in 0.03228 seconds