B4J Question Scrollpane Scroll bar Color

MarcTG

Active Member
Licensed User
I am trying to change the color of the vertical and horizontal scrollbars in a scrollpane using Extra CSS but it doesn't seem to be working... Can anyone please suggest how this can be done?

Thanks!
 

AnandGupta

Well-Known Member
Licensed User
Just upload the code which is not working and we may find the solution.

Regards,

Anand
 

MarcTG

Active Member
Licensed User
B4X:
.scroll-pane {
    -fx-background-color: orange;
}

.scroll-bar:horizontal, .scroll-bar:vertical{
    -fx-background-color:transparent;
}

.increment-button, .decrement-button {
    -fx-background-color: transparent;
    -fx-border-color: transparent;
}

.scroll-bar:horizontal .track,
.scroll-bar:vertical .track{
    -fx-background-color: blue;
    -fx-border-color: blue;
    -fx-background-radius: 0em;
}

.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
    -fx-background-color: white;
    -fx-background-radius: 5em;
}
Not sure how to do it using the Extra CSS...
 
Top