필터 지우기
필터 지우기

figure menu when resizing

조회 수: 2 (최근 30일)
DF
DF 2011년 11월 15일
When I resize a figure and make it smaller the menu is compressed and is not readable. This behavior is different in an older Matlab version (2006) when the menu is displayed on 2 rows when the figure size is too small. How can I get the old behavior in the new(er) Matlab?
Thanks!

채택된 답변

Yair Altman
Yair Altman 2011년 11월 20일
This is covered in section 5.2.1 of my Matlab-Java book:
jFrame = get(handle(gcf), 'JavaFrame')
try
jMenuBar = jFrame.fHG1Client.getMenuBar;
catch
jMenuBar = jFrame.fFigureClient.getMenuBar; % R2007b and earlier
end
jMenuBar.setMoreMenuEnabled(true);
Yair Altman

추가 답변 (3개)

DF
DF 2011년 11월 20일
I come back to this question with more details, maybe someone has an idea. When I execute the code below in Matlab2011 I get all menus on the same line in the menu bar and the menu label is not entirely visible. However, in Matlab2003 starting from 'Function6' a new line is created in the menu bar. How can I split the menus over 2 lines in the menu bar in Matlab2011?
figure
f = uimenu('Label','Function1');
f = uimenu('Label','Function2');
f = uimenu('Label','Function3');
f = uimenu('Label','Function4');
f = uimenu('Label','Function5');
f = uimenu('Label','Function6');
f = uimenu('Label','Function7');
  댓글 수: 1
Jan
Jan 2011년 11월 20일
A question for Yair.

댓글을 달려면 로그인하십시오.


DC
DC 2011년 11월 21일
Thanks for your reply! Although a reasonable solution to my problem, this is only a workaround, in the sense that it does not put the menu bar on 2 lines, but adds an extension to the menu bar which only becomes visible when clicking the arrow. Is there no way to create a menu bar on more lines?

Jan
Jan 2011년 11월 21일
Perhaps this helps: FEX: menubar

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by