aspose file tools*
The moose likes JavaFX and the fly likes How to change background color of selected TreeCell? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JavaFX
Bookmark "How to change background color of selected TreeCell?" Watch "How to change background color of selected TreeCell?" New topic
Author

How to change background color of selected TreeCell?

Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

I have read already about Cell here.
They say if you want to change background color of selected TreeItem you need to use :

I tried list-cell, tree-cell and my own selector and all does not work.

How to change background color of selected tree cell?

Thnaks!


True person is moral, false is right!
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

It started to work. Probably eclipse did not recompile it all
Josh Bodily
Greenhorn

Joined: Aug 30, 2012
Posts: 2
From the documentation on the link you provided:

Following are a number of key use cases used to drive the Cell API design, along with code examples showing how those use cases are satisfied by this API. This is by no means to be considered the definitive list of capabilities or features supported, but rather, to provide some guidance as to how to use the Cell API. The examples below are focused on the ListView, but the same philosophy applies to TreeCells or other kinds of cells.


So, you should use the ".tree-cell" selector, not the ".list-cell" selector to style cells of a TreeView.

Complete CSS reference here:
JavaFX CSS Reference
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change background color of selected TreeCell?