After resizing the window my SplitPane's divider moves to another position according to the given percentage (e.g.: dividerPositions="0.05").
But I want it to stay on the same position after resizing (like it was bound to pixel size and not percentage) where it was set before. I don't want it "move" (follow the percentage constraint) while resizing it's parent pane.
Is it possible to do this somehow? (I would like to fix this preferably from code, the CSS solution is secondary for me)
The perfect solution for me would something be similar to this:
<SplitPane orientation="VERTICAL" dividerPositionFromTop="100px"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" >
...
</SplitPane>
Where dividerPositionFromTop sadly does not exist by my knowledge.
You can add a listener to the
heightProperty
of yourSplitPane
and recalculate the percentage value: