cljfx

2021-12-02T17:16:30.011200Z

How might I add a context menu to a tree item or a table row? For example, something like this:

{:fx/type  :tree-item
 :value    1
 :children [2 3 4 5]
 :context-menu {:fx/type :context-menu
                :items   [{:fx/type   :menu-item
                           :text      "Some menu item..."
                           :on-action {:event/type ::show-value}}]}}
Note that the above :context-menu is not a valid property - this is just for illustration.

vlaaad 2021-12-07T10:17:20.011300Z

I was thinking something like this exists, but it seems I’m wrong

vlaaad 2021-12-07T10:18:18.011500Z

I mixed it up with https://github.com/cljfx/cljfx/blob/master/src/cljfx/ext/node.clj — extension to install tooltips on non-Control nodes

vlaaad 2021-12-07T10:18:41.011800Z

maybe something similar can be done for installing context menus…