MATLAB: How to customize the figure menubar in MATLAB 7.4 (R2007a)

barcustomizehideinvisibleMATLABmenumenubarofftoolbarvisiblewindows

I want to customize the figure menubar and hide the Windows menu.

Best Answer

The handles for menus in a figure are hidden by default. You can disable handle hiding by setting "ShowHiddenHandles" property to 'on', find 'Windows" menu with its tag "figMenuWindow" using FINDOBJ function and set its visibility to "off" using "Visible" property as in the following example code:
% Create a figure
figure
% Show all figure’s hidden handles.
set(0,'showhiddenhandles','on')
% Obtain the handle for window menu using its 'Tag' property
h = findobj(gcf,'Tag','figMenuWindow');
% The second child is the Windows menu, make it invisible.
set(h,'Visible','off');