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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!