Use of uicontextmenu with uitree and uitable

2 ビュー (過去 30 日間)
Udi Gal
Udi Gal 2021 年 2 月 24 日
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 Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by