appdesigner context menu opening in the wrong position
9 views (last 30 days)
Show older comments
I have been working on an app mostly in R2022a. After updating to R2022b I noticed a context menu for a UIAxes is now opening far away from the click point. I'm not sure if the update broke it or what. I tried to find a way to set the position of the context menu, or make my own menu, but I didn't have luck. Does anyone have a fix for this? Thanks
I tried adding a brand new UIAxes to the app and adding a brand new contextmenu to it. The same bad behavior resulted. If I make a new app, everything is fine.
2 Comments
Cameron
on 22 Dec 2022
I'm using R2022b and haven't found any issues. What does your code look like for your ContextMenu? I'll show you what I was using when I didn't get any errors when right clicking for the ContextMenu.
cm = uicontextmenu(app.UIFigure);
m1 = uimenu(cm,"Text","Option 1");
m2 = uimenu(cm,"Text","Option 2");
app.UIAxes.ContextMenu = cm;
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!