Based on this example (Option #1) I am creating a fixed column by using 2 TableView
s in a SplitPane
.
The TableView
that shows the other columns (not the fixed one) may get so wide that a ScrollBar
is displayed, for which I have to compensate with -fx-padding: 0 0 13px 0;
in order to keep the TableRow
s of both TableView
s aligned.
So I have to figure out now whether a ScrollBar
is being displayed or not or find a completely different way to ensure the TableRow
alignment. The obvious way unfortunately doesn't seem to be working. (The ScrollBar
is not null
, I just didn't post the code to ensure that)
ScrollBar horizontalScrollBar = (ScrollBar) lookup(".scroll-bar:horizontal");
horizontalScrollBar.visibleProperty().addListener((observable, oldValue, newValue) -> {
System.out.println(newValueobservableScrollBar);
});
For some reason the Listener is not fired when the ScrollBar
appears or disappears.