How can I hide the tree expander button of specific tree node when all its children are invisible.
As with any GraphObject, either set or bind visible to false or opacity to 0.
Do you mean binding the visible property of the tree “Expander Button”?
Yes, that’s one way to get the behavior that I think you want, although it isn’t clear to me that it’s possible to implement it in all of the imaginable circumstances. It really depends on why and how the tree children might become invisible.
After all, just collapsing the node will cause all of the children to be invisible.
Thank Walter. Children of a node can be contractors or vacancies or students or employees or the combination of all the types. The expander button can be shown if there is a least one child visible and hidden if there is no children or all children are invisible (they are still exists). Do you have any example or forum close to the cases so I can take a look?
So you want to hide the button when all children are not visible? But then the user cannot expand the tree. So you have another way to show children. In fact perhaps you don’t want to use Node.isTreeExpanded at all?