The scrollbar for the JFXTreeTableView is the default JavaFX one. Could you please add a material design one or tell me how could I set it up? Thanks.
Hi, try using this in your CSS file:
.scroll-bar:vertical > .track-background, .scroll-bar:horizontal > .track-background {
-fx-background-color: transparent;
}
.scroll-bar:vertical > .thumb, .scroll-bar:horizontal > .thumb {
-fx-background-color: #BDBDBD;
-fx-background-insets: 0.0;
-fx-background-radius: 1.0;
}
.scroll-bar > .increment-button, .scroll-bar > .decrement-button {
-fx-padding: 0;
}
.scroll-bar > .increment-button, .scroll-bar > .decrement-button,
.scroll-bar:hover > .increment-button, .scroll-bar:hover > .decrement-button {
-fx-background-color: transparent;
}
.scroll-bar > .increment-button > .increment-arrow,
.scroll-bar > .decrement-button > .decrement-arrow {
-fx-background-color: rgb(150.0, 150.0, 150.0);
}
.scroll-bar:horizontal .track,
.scroll-bar:vertical .track {
-fx-background-color: #F5F5F5;
-fx-border-width: 0;
}
.scroll-bar:horizontal .increment-button,
.scroll-bar:horizontal .decrement-button {
-fx-background-color: transparent;
-fx-background-radius: 0;
-fx-padding: 0 0 8 0;
}
.scroll-bar:vertical .increment-button,
.scroll-bar:vertical .decrement-button {
-fx-background-color: transparent;
-fx-background-radius: 0em;
-fx-padding: 0 8 0 0;
}
.scroll-bar .increment-arrow,
.scroll-bar .decrement-arrow {
-fx-shape: "" !important;
-fx-padding: 0 !important;
}
.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-insets: 1;
}
this will set Material-ich scrollbars for you whole project.
Thanks. That fixed it!
Most helpful comment
Hi, try using this in your CSS file:
.scroll-bar:vertical > .track-background, .scroll-bar:horizontal > .track-background {
-fx-background-color: transparent;
}
.scroll-bar:vertical > .thumb, .scroll-bar:horizontal > .thumb {
-fx-background-color: #BDBDBD;
-fx-background-insets: 0.0;
-fx-background-radius: 1.0;
}
.scroll-bar > .increment-button, .scroll-bar > .decrement-button {
-fx-padding: 0;
}
.scroll-bar > .increment-button, .scroll-bar > .decrement-button,
.scroll-bar:hover > .increment-button, .scroll-bar:hover > .decrement-button {
-fx-background-color: transparent;
}
.scroll-bar > .increment-button > .increment-arrow,
.scroll-bar > .decrement-button > .decrement-arrow {
-fx-background-color: rgb(150.0, 150.0, 150.0);
}
.scroll-bar:horizontal .track,
.scroll-bar:vertical .track {
-fx-background-color: #F5F5F5;
-fx-border-width: 0;
}
.scroll-bar:horizontal .increment-button,
.scroll-bar:horizontal .decrement-button {
-fx-background-color: transparent;
-fx-background-radius: 0;
-fx-padding: 0 0 8 0;
}
.scroll-bar:vertical .increment-button,
.scroll-bar:vertical .decrement-button {
-fx-background-color: transparent;
-fx-background-radius: 0em;
-fx-padding: 0 8 0 0;
}
.scroll-bar .increment-arrow,
.scroll-bar .decrement-arrow {
-fx-shape: "" !important;
-fx-padding: 0 !important;
}
.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-insets: 1;
}
this will set Material-ich scrollbars for you whole project.