B4J Question TableView: Changing Selection Bar colors [SOLVED]


Active Member
Licensed User
Longtime User
The selection bar in the TableView is a blue color. Doesn't match my app color scheme at all o_O

[EDIT] Solved it putting the code into the "extra css" in the tableview properties in the designer!

If I use the following code the selection bar changes to the color I request:
tblMediaTracks.Style = "-fx-selection-bar: forestgreen;"

But the whole look of the table changes as well, including the size of the rows, and the background color that was set up in the Designer.
These two attachments show the unmodified and modified results:
TableView unmodified.PNG

TableView with Modified Selection Bar style.PNG

It feels as though changing the Selection bar alone has also changed other style values.
Is there something I can do to keep the original sheet style and just change the Selection Bar color?
Last edited:


Licensed User
Longtime User
New Style content substitutes any previous content, so you have a few options:
- add to your new style content the original one
- use CSSUtils (recommended)
- update the CSS file (or create a new one based on your new needs)
Upvote 0