Hi,
I would like to keep the same values of the positions for dividers (SplitPane) even if the width or the height of the window changes.
I wont to keep the proportion of the differents dividers.
After resizing the window, the values of positions are not the sames !
I use this source without success :
stage.widthProperty().addListener(new ChangeListener<Number>() {
@Override public void changed( ObservableValue<? extends Number> observableValue, Number number, Number number2) {
sp.setDividerPositions(0.40f, 0.02f, 0.54f);
}
});
stage.heightProperty().addListener(new ChangeListener<Number>() {
@Override public void changed( ObservableValue<? extends Number> observableValue, Number number, Number number2) {
sp.setDividerPositions(0.40f, 0.02f, 0.54f);
}
});
If you have a idea...
Thanks you in advance.
Fabrice