I need assistance with styling TreeTableViews and their rows. I have set up a treetableview showcasing objects named Component, divided into classes A, B, and C. In my setup, B objects are nested within A, and C objects are nested within B objects. While I was able to display the TreeTableView with these three levels of Components, I am now looking to customize the table's appearance using CSS for specific characteristics:
- Firstly, I want A objects to appear larger than B objects, and the same goes for C. To achieve this, I've attempted various methods found online, such as:
.tree-table-cell {
-fx-font-size: 11pt;
}
.tree-table-cell:sub-tree-item {
-fx-font-size: 9pt;
}
However, it seems that these changes are not taking effect...
- Next, I would like to include a separator between each A component for better table visibility.
- Lastly, I wish to visually emphasize the selected item along with its tree node (meaning, if C is selected, then the C element along with its parent B and parent A should stand out). I attempted applying some basic CSS to achieve this:
.tree-item:selected {
-fx-font-weight: bold;
}
Unfortunately, these modifications also did not work...
In essence, I am finding it challenging to style my TreeItems as desired (since adding StyleSheets Class directly to TreeItem is not feasible).
I hope my explanation is clear enough. Thank you for your assistance.