Javafx Treeview item action event

前端 未结 4 1988
小蘑菇
小蘑菇 2020-12-09 07:06

I\'m trying to create a menu using a treeView. This is the first time I\'m using treeView and have been reading up on it on several websites.

I\'m having some proble

4条回答
  •  不知归路
    2020-12-09 07:32

    According to the JavaFX 2.2 documentation :

    " ..a TreeItem is not a Node, and therefore no visual events will be fired on the TreeItem, To get these events, it is necessary to add relevant observers to the TreeCell instances (via a custom cell factory)."

    I think this example on using TreeView will be somehow useful.

提交回复
热议问题