G GuyBooth Active Member Licensed User Longtime User Dec 30, 2018 #1 The selection bar in the TableView is a blue color. Doesn't match my app color scheme at all [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: Code: 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: 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: Dec 30, 2018
The selection bar in the TableView is a blue color. Doesn't match my app color scheme at all [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: Code: 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: 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?
udg Expert Licensed User Longtime User Dec 31, 2018 #2 tblMediaTracks.Style Click to expand... 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
tblMediaTracks.Style Click to expand... 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)