Use of uicontextmenu with uitree and uitable

2 visualizaciones (últimos 30 días)
Udi Gal
Udi Gal el 24 de Feb. de 2021
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

Respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by