Style TreeItem at the time of creation

49 views Asked by At

I would like to have some of my TreeItems with different font, italic or color and I see that perhaps TreeCell in JavaFX should be used somehow. I want to apply this at the moment I create the TreeItem, i.e. when I do

root.getChilden().add(...) 

I would imagine that there should be a way to access the style properties for this TreeItem and apply some set methods accordingly.

Regards

Update : this is more or less what I want to achieve

1.root is created 2. Add a child test i. e. root.getChildren.add("test") 3.set this child italic and red 4. Add another child test1 5 set the child test1 to font size 12 and bold

0

There are 0 answers