I have a form with two TableViews - tblSources and tblMediaTracks. For the tblMediaTracks I want the selection bars to be green, and for the tblSources I want them to be blue. I can make the selection bars on both tableviews green (color #84A082 & #ACC2AB) using a file called TableRows.css containing this code:
which I then apply using this code:
How can I use this code to apply to one specific tableview, and add a second set of "rules" for the other one and have each one applied to the correct tableview? I have seen references to "ID"s in CSS but haven't been able to figure out how to use them in B4J.
B4X:
/* Selected row */
.table-view:focused .table-row-cell:filled:focused:selected {
-fx-background-color: #84A082;
}
/* Selected row when table not focused */
.table-row-cell:filled:focused:selected {
-fx-background-color: #84A082;
}
/* Row hovered */
.table-view:row-selection .table-row-cell:filled:hover {
-fx-background-color: #ACC2AB;
}
/* Selected row hovered when table not focused */
.table-view:row-selection .table-row-cell:filled:focused:hover {
-fx-background-color: #84A082;
}
B4X:
Form.Stylesheets.Add(File.GetUri(File.DirAssets, "TableRows.css"))