I have got some trouble with treeitems of a treeview. There are expand and collapse icon-arrows, when you have child-treeitems. I only know how to change the background-color of this expand/collapse icons. But I don't know how to change the color of the arrow.
.tree-cell .tree-disclosure-node {
-fx-background-color: #CCCCCC;
}
.tree-cell:expanded .tree-disclosure-node {
-fx-color: #CCCCCC;
}
Is there any chance to change the color of this arrow? I don't want to use self drawing icons. I just want to change the color of the arrow.
According to TreeViewSkin
, the disclosure node is a StackPane
, and has as a child another StackPane
with style class arrow
.
If you want to change the default color of this node, just add the color for the arrow
class:
.tree-cell > .tree-disclosure-node > .arrow {
-fx-background-color: red;
}
.tree-cell:expanded > .tree-disclosure-node > .arrow {
-fx-background-color: blue;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With