I'm wondering if there is any option to set divider postition to constant position (SplitPane) in FXML file? I'm trying to hold this divider in determined place.
Asked
Active
Viewed 4,116 times
1 Answers
2
Yes it possible with one trick. You have to set Pref Width for your SplitPane
like here:
Then you have to set Min Width for each AnchorPane
like here:
And it will be not possible to move divider, because divider has some rules:
The dividers in a SplitPane have the following behavior
- Dividers cannot overlap another divider
- Dividers cannot overlap a node.
- Dividers moving to the left/top will stop when the node's min size is reached.
- Dividers moving to the right/bottom will stop when the node's max size is reached.
Source: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/SplitPane.html

BadVegan
- 494
- 6
- 8