Use of uicontextmenu with uitree and uitable

2 次查看(过去 30 天)
I'm building an app using App Designer, and I have encountered a problem.
1) I would like to assign the same uicontextmenu to several uitreenodes and have the MenuSelectedFcn respond to the respective node's NodeData. I tried to make it work via the Tree.SelectedNodes property, however, a node is selected via leftclicking, and I end up passing the different node's NodeData, or make the user leftclick the node before rightclicking for the correct context menu.
Is there a way of selecting a node using rightclick, or alternatively, getting the handle of the node leftclicked?
2) Moreover, I would like to acieve a similar result with uitable:
when I leftclick a certain cell, I would like the contextmenu to respont to the row of the cell (specifically, to the uitable's UserData in the same row as the cell).
Best Regards,
Udi

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by