extra uimenu in GUI figure (R2023b)

2 次查看(过去 30 天)
Similar to this question about toolbar MATLAB R2023b inserts menu on my GUI figure any request.
For example the green one is mine, then MATLAB R2023 just puts their menus there (red).
I don't kow what else they mess with !
This is totally innaceptable. I must rollback to R2023a.
  3 个评论
Bruno Luong
Bruno Luong 2023-9-15
Hi @Adam Danz, are you talking about the top GUIDE menu just bellow the figure name? See screen shot where I define only 2 menus in GUIDE
Bruno Luong
Bruno Luong 2023-9-15
My workaround is to call this function to remove extra menu base of specific Tag
function RemoveMatlabToolbar(fig)
% RemoveMatlabToolbar(fig)
% Since R2023b MATLAB GUI add a separate toolbar in the figure
% Also a tone of menus
% If you don't want it, call this function in your OpeningFcn
try %#ok
if ~isMATLABReleaseOlderThan("R2023b")
h = findall(fig,'Type','uitoolbar');
Tag = get(h,'Tag');
b = strcmp(Tag,'FigureToolBar'); % This seems to be the default Tag of MATLAB toolbar
delete(h(b));
% filter out MATLAB menu
h = findall(fig,'Type','uimenu');
Tag = get(h,'Tag');
c = regexp(Tag, '^figMenu', 'once');
keep = cellfun('isempty', c);
delete(h(~keep))
end
end
end % RemoveMatlabToolbar

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by