Jfoenix: JFXTreeTableView ScrollBar

Created on 7 Dec 2017  路  2Comments  路  Source: sshahine/JFoenix

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.

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.

All 2 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deme78 picture deme78  路  3Comments

RodrigoSantiago picture RodrigoSantiago  路  3Comments

swftvsn picture swftvsn  路  3Comments

TurekBot picture TurekBot  路  5Comments

ivanskodje picture ivanskodje  路  4Comments