UIContextMenu when defined does not show in Matlab 2021b
51 次查看(过去 30 天)
显示 更早的评论
I have a class that inherits from matlab component container. I define a uiaxes in the setup method. Since, the setup method does not allow access to the parent figure of the object, I cannot add a uicontextmenu to the figure. To get around this I added a CreateFcn.
In the CreateFcn I define a uicontextmenu and add it to the uiaxes defined in the setup method. When I check the uiaxes object, the menu is added correctly. The menu although does not show up when I right click in the created GUI.
I have the same code and it works on every version after 2021b. Could someone help with how I can make this compatible with 2021b?
0 个评论
回答(1 个)
Bruno Luong
2024-11-12,6:09
uiaxes/uifigure are not compatible wit axes/figure. I recommend simply do not make a switch.
另请参阅
类别
在 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!