-
Enhancement
-
Resolution: Unresolved
-
P4
-
7-pool
It should be very helpful to know if a scroll bar within a scroll pane is visible or not.
In my case, I want to add 1 pixel gap between the scroll pane content and the scroll bar (See attached screen shot).
To do this, I need to dynamically add/remove css rules :
.scrollBarVisible {
/* Add 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is visible */
-fx-padding: 0 1 0 0;
}
.scrollBarNotVisible {
/* Remove 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is _not_ visible */
-fx-padding: 0;
}
A pseudo-calss would allow something like :
.scroll-bar {
-fx-padding: 0;
}
.scroll-bar:visible {
-fx-padding: 0 1 0 0;
}
In my case, I want to add 1 pixel gap between the scroll pane content and the scroll bar (See attached screen shot).
To do this, I need to dynamically add/remove css rules :
.scrollBarVisible {
/* Add 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is visible */
-fx-padding: 0 1 0 0;
}
.scrollBarNotVisible {
/* Remove 1 pixel gap between the ScrollPane content and the ScrollPane scroll bar when the scroll bar is _not_ visible */
-fx-padding: 0;
}
A pseudo-calss would allow something like :
.scroll-bar {
-fx-padding: 0;
}
.scroll-bar:visible {
-fx-padding: 0 1 0 0;
}
- relates to
-
JDK-8091864 How to access to ScrollBar component in ScrollPane control ?
-
- Open
-