Within my code, I have implemented a SplitPane
and included a CSS file that contains the following styling rules:
.split-pane > .split-pane-divider {
-fx-padding: 0 0 0 1;
-fx-background-color:-fx-background;
}
However, during runtime, I encountered the need to modify these styling rules for the divider. I attempted the following solution:
SplitPane.Divider divider = splitPane.getDividers().get(0);
divider.setStyle("-fx-padding: 1 1 1 1; -fx-background-color:-fx-background;");
Unfortunately, I discovered that the method setStyle
is not available in the SplitPane.Divider
class.
Is there an alternative way to adjust these styling rules dynamically at runtime?