Filter löschen
Filter löschen

which tree node fires a context menu

4 Ansichten (letzte 30 Tage)
Peng Li
Peng Li am 22 Mär. 2021
Kommentiert: Steven Nittel am 27 Jun. 2021
I have a specific question about the context menu for uitree. It seems that there is no way to identify within the ContextMenuOpening or ContextMenuSelected callbacks which specific tree node fires this call. The two callbacks only accepts app and event as input. There isn't a source variable that is allowed. However, Source is also a field of event struct, but this event.Source points to the context menu, not the source that fires it.
any solution?
  1 Kommentar
Steven Nittel
Steven Nittel am 27 Jun. 2021
You can add a dedicated context menu to each tree node and give it a Tag and/or UserData.
The event source will contain the Tag as well as the UserData.

Melden Sie sich an, um zu kommentieren.

Antworten (0)


Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by