How do I customize the figure menubar in MATLAB 7.4 (R2007a)?

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

 Accepted 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');

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Release

R2007a

Community Treasure Hunt

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

Start Hunting!