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!