B4J Question Best approach to customize the look of TreeView items?

MegatenFreak

Active Member
Licensed User
Hi.
I'm looking for a way to fully customize the look and feel of the items in a tree view, as I'm using it for my app's vertical menu. I want to change the border, background color, etc.
I dug around here and in Java documentation, and it seems the only way is to create my own CellFactory function for rendering those items. I've searched this forum but I still haven't found the answer to these questions of mine:
1. How can I pass on a B4J function as a parameter to the TreeView JavaObject (as the callback function required) :
setCellFactory(Callback<TreeView<T>,TreeCell<T>> value)
2. What should this callback function contain? Are there any templates out there helping me learn how it should communicate with the tree view and do the rendering?

Any help would be greatly appreciated.
Thank you so much in advance.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…