Reputation: 2259
I have SplitPane in my application. This is SplitPane have divider with default width. How can i set the width of SplitPane Divider
@FXML
private SplitPane splitPane;
// splitPane here get Divider and set New Width
Upvotes: 6
Views: 11611
Reputation: 170
For JavaFX8: If you create your view from .fxml file, you can set divider's position using the attribute dividerPosition
of the node SplitPane
:
<SplitPane dividerPositions="0.3">
</SplitPane>
Upvotes: -1
Reputation: 209674
Use css to change the width of the divider:
.split-pane > .split-pane-divider {
-fx-padding: 0 0.75em 0 0.75em;
}
Upvotes: 16