Why do uimenu items remain depressed after being activated when running a GUI in MATLAB 7.0 (R14)?
조회 수: 1 (최근 30일)
이전 댓글 표시
My GUI features uimenu items associated with a variety of callbacks. When I run my GUI in MATLAB 7.0 (R14) and activate a uimenu item, its appearance remains depressed until I click on the figure or otherwise refresh the window. This can be demonstrated with the following code:
h_fig = figure('Name','Test Figure', 'MenuBar','none',...
'Units','normalized', 'Position',[.1 .1 .5 .5]);
h_menu = uimenu(h_fig,'Label','Click me',...
'Callback','axes(h_axes); plot(5,0,''rp'');');
t = 0:.01:10;
y = sin(2*pi*t);
h_axes = axes('NextPlot','add');
plot(t,y);
title('Test Figure');
This behavior interferes with the execution of certain uimenu item callbacks, for example, a callback involving GINPUT.
채택된 답변
MathWorks Support Team
2009년 6월 27일
This is a bug in MATLAB 7.0 (R14) in the way uimenu items are rendered.
This bug has been fixed in MATLAB 7.2 (R2006a).
If you are using a previous version of MATLAB, to work around this issue, try disabling the Java features of figures with the following command:
feature('JavaFigures',0);
Note that as a result of disabling the Java figures feature, you will no longer be able to dock/undock figure windows in the desktop, group together undocked figure windows, etc.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!