Why does the context menu not appear when right-clicking a node in a checked box tree?

I have a checked box tree with a context menu that allows the user to delete the selected node. The context menu only appears when I right-click in open space away from the node. I am unable to right-click the node itself to open the context menu.
I have attached a simple example tree to illustrate.

 Accepted Answer

uitreenodes each can have their own uicontextmenus, so you need to associate the context menu with the nodes rather than with the uitree itself. See the attached modified app.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Release

R2023a

Asked:

Ben
on 3 Oct 2023

Answered:

on 3 Oct 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!