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.
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.