Borrar filtros
Borrar filtros

uistack figure simulator top

2 visualizaciones (últimos 30 días)
john
john el 20 de Mzo. de 2014
Comentada: john el 24 de Mzo. de 2014
Hello,
software ( main figure) in gui has name Simulator. If I have opened two and more figures, and I use
set(0,'CurrentFigure',findobj('type','figure','name','Simulator'))
f=gcf
uistack(f, 'top')
than Simulator is on the top. But if there is opened only Simulator, and I use above code, than appears main Matlba Window on the top.
How can I do, that Simulator will be always on the top?
Thank you
  1 comentario
john
john el 23 de Mzo. de 2014
I solved it by this code:
set(0,'CurrentFigure',findobj('type','figure','name','Simulator'))
f=gcf;
uistack(f,'top');
figure(f);
set(0,'CurrentFigure',f);
uistack(f,'top');

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 23 de Mzo. de 2014
Editada: Jan el 23 de Mzo. de 2014
According to the documentation, this should be sufficient already:
FigH = findobj(allchild(0), 'flat', 'name', 'Simulator');
figure(FigH);
  3 comentarios
john
john el 23 de Mzo. de 2014
For example, I have two figures, one is main.
If main is top, and I use
uistack(FigH,'top');
than second figure I show for realy short time, after that, main figure is in the top.....why there is switching between figures? if main is on the top?
john
john el 24 de Mzo. de 2014
code:
FigH = findobj(allchild(0), 'flat', 'name', 'Simulator');
figure(FigH);
uistack(FigH,'top');
sometimes doesn't work, sometimes main figure is not on top...:-O

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by