I am trying to use a TreeExpanderButton in an Adornment that is shown when a node is selected. Everything seems to work well so far, except for the fact that the button state is always collapsed [-]. This is how I trigger the Adornment:
Note how the two Bindings have source properties, “isTreeExpanded” and “isTreeLeaf”, on the GraphObject button’s Part due to the binding being Binding.ofObject. But if the button is in an Adornment, it’s not in a Node. The Adornment class does not have those two properties.
The “TreeExpanderButton” definition would need to be changed to work in an Adornment instead of a Node. But you can copy and adapt the code to do what you want.
Alright, thanks for clarifying this! I will try your proposed solution. Most probably I would have had to define a custom expander button anyway, so thanks for the link.