which tree node fires a context menu

4 次查看(过去 30 天)
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 个评论
Steven Nittel
Steven Nittel 2021-6-27
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by