Why do uimenu items remain depressed after being activated when running a GUI in MATLAB 7.0 (R14)?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
Respuesta aceptada
MathWorks Support Team
el 27 de Jun. de 2009
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!