Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » PartSashContainter - set partSize in px
PartSashContainter - set partSize in px [message #1695323] Wed, 13 May 2015 13:24 Go to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
Hello,
1.
I add:
    <children xsi:type="basic:PartSashContainer" xmi:id="_4IN2EPlxEeSJ7MGbdT-fCQ" elementId="test11.app.partsashcontainer.0" horizontal="true">
      <children xsi:type="basic:Part" xmi:id="_4j6TkPlxEeSJ7MGbdT-fCQ" elementId="test11.app.part.0" containerData="1000"/>
      <children xsi:type="basic:Part" xmi:id="_5VvZIPlxEeSJ7MGbdT-fCQ" elementId="test11.app.part.1" containerData="99000"/>
    </children>
in theory the containterData sets as %. But when I change width of the trimmedWindow, the divider posision isn't the same (but change windowWidht, not containerData).

2.
I set in the first part containter data 100, second containter data 900, but first part takes more than 10%...


________________
I want to set 1st panel in px (even in addon at start), but I don't known, what I must put in the container data, or maybe there is other solution?

Regards
Re: PartSashContainter - set partSize in px [message #1695329 is a reply to message #1695323] Wed, 13 May 2015 13:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
a) PartSashContainer uses a SplitPane and we calculate the value you
provide to spitter positions (see
DefSashRenderer.WResizeableSash#doRecalc)

b) the resize behavior is the SplitPane uses it so if the SplitPane is
resized the children will be resized as well so it will resize all
children (a guess I have is that setResizableWithParent could fix
that?)

You can check the code if our calculation is invalid but SplitPane is a
bit of a pain because eg on initial layout it sometime behaves really
strange.

c) It looks like you want to have a fixed layout so then you
fx_fixedLayout, fx_layout_width, ... sounds like what you are
looking for see
https://wiki.eclipse.org/Efxclipse/Runtime/e4#MPartSashContainer

Tom

On 13.05.15 15:24, Bart Cichy wrote:
> Hello,
> 1.
> I add:
> <children xsi:type="basic:PartSashContainer"
> xmi:id="_4IN2EPlxEeSJ7MGbdT-fCQ"
> elementId="test11.app.partsashcontainer.0" horizontal="true">
> <children xsi:type="basic:Part" xmi:id="_4j6TkPlxEeSJ7MGbdT-fCQ"
> elementId="test11.app.part.0" containerData="1000"/>
> <children xsi:type="basic:Part" xmi:id="_5VvZIPlxEeSJ7MGbdT-fCQ"
> elementId="test11.app.part.1" containerData="99000"/>
> </children>in theory the containterData sets as %. But when I change
> width of the trimmedWindow, the divider posision isn't the same (but
> change windowWidht, not containerData).
>
> 2.
> I set in the first part containter data 100, second containter data 900,
> but first part takes more than 10%...
>
>
> ________________
> I want to set 1st panel in px (even in addon at start), but I don't
> known, what I must put in the container data, or maybe there is other
> solution?
>
> Regards
Re: PartSashContainter - set partSize in px [message #1695332 is a reply to message #1695329] Wed, 13 May 2015 13:47 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
once more in proper english

a) PartSashContainer uses a SplitPane and we calculate the value you
provided to splitter positions (see
DefSashRenderer.WResizeableSash#doRecalc)

b) the resize behavior is inherited from SplitPane so if the width is
changed all children will get more space, it might be that
SplitPane#setResizableWithParent could fix that?

You can check the code of our calculation is invalid but SplitPane but I
know that SplitPane sometime behaves very strange eg when the Stage is
rendered the first time and the Scene does not yet have the real size.

c) It looks like you want to have a fixed layout so then
fx_fixedLayout, fx_layout_width, ... sounds like what you are
looking for see
https://wiki.eclipse.org/Efxclipse/Runtime/e4#MPartSashContainer

Tom

On 13.05.15 15:37, Tom Schindl wrote:
> a) PartSashContainer uses a SplitPane and we calculate the value you
> provide to spitter positions (see
> DefSashRenderer.WResizeableSash#doRecalc)
>
> b) the resize behavior is the SplitPane uses it so if the SplitPane is
> resized the children will be resized as well so it will resize all
> children (a guess I have is that setResizableWithParent could fix
> that?)
>
> You can check the code if our calculation is invalid but SplitPane is a
> bit of a pain because eg on initial layout it sometime behaves really
> strange.
>
> c) It looks like you want to have a fixed layout so then you
> fx_fixedLayout, fx_layout_width, ... sounds like what you are
> looking for see
> https://wiki.eclipse.org/Efxclipse/Runtime/e4#MPartSashContainer
>
> Tom
>
> On 13.05.15 15:24, Bart Cichy wrote:
>> Hello,
>> 1.
>> I add:
>> <children xsi:type="basic:PartSashContainer"
>> xmi:id="_4IN2EPlxEeSJ7MGbdT-fCQ"
>> elementId="test11.app.partsashcontainer.0" horizontal="true">
>> <children xsi:type="basic:Part" xmi:id="_4j6TkPlxEeSJ7MGbdT-fCQ"
>> elementId="test11.app.part.0" containerData="1000"/>
>> <children xsi:type="basic:Part" xmi:id="_5VvZIPlxEeSJ7MGbdT-fCQ"
>> elementId="test11.app.part.1" containerData="99000"/>
>> </children>in theory the containterData sets as %. But when I change
>> width of the trimmedWindow, the divider posision isn't the same (but
>> change windowWidht, not containerData).
>>
>> 2.
>> I set in the first part containter data 100, second containter data 900,
>> but first part takes more than 10%...
>>
>>
>> ________________
>> I want to set 1st panel in px (even in addon at start), but I don't
>> known, what I must put in the container data, or maybe there is other
>> solution?
>>
>> Regards
>
Previous Topic:org.eclipse.equinox.registry is missing package org.xml.sax.helpers
Next Topic:FXML to Java Code
Goto Forum:
  


Current Time: Thu Apr 25 14:29:35 GMT 2024

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

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

Back to the top