extra uimenu in GUI figure (R2023b)

3 visualizaciones (últimos 30 días)
Bruno Luong
Bruno Luong el 15 de Sept. de 2023
Comentada: Bruno Luong el 15 de Sept. de 2023
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 comentarios
Bruno Luong
Bruno Luong el 15 de Sept. de 2023
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 el 15 de Sept. de 2023
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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by