How can you make such stripes (hatching) in a treeview?
Googled as best I could, nowhere and there is no hint of such a thing
- oneAs far as I know, now this does not do at all. He himself asked such a question - Andrew Bystrov
- And where did you get this screen from? - Andrew Bystrov
- He took the screen from here: by-bismark.net.ua/javafx-izmenit-ikonki-dlya-treeview - BogdanBida
- @Bogdab Bida even lies some kind. This screen looks like a swing tree - Andrew Bystrov
- Here are 2 screenshots, 2nd is an example (this is a swing), 1st proof of the possibility of this in javafx - BogdanBida
|
1 answer
Very simple:
TreeItem<HBox> item=new TreeItem<HBox>(new HBox(new ImageView(new Image(inputStream)),new Label("Root"))); item.getChildren().add(new TreeItem<HBox>(new HBox(new ImageView(new Image(inputStream)),new Label("Item1")))); TreeView<HBox> treeView=new TreeView<HBox>(item); If desired, you can make instead of HBox a class that will automatically change the image depending on the structure of the TreeItem.
|

