extra uimenu in GUI figure (R2023b)

조회 수: 3 (최근 30일)
Bruno Luong
Bruno Luong 2023년 9월 15일
댓글: Bruno Luong 2023년 9월 15일
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