Handle figures without bringing them to the front

I'm using 'get' to save the name of a figure with:
h = get(figure(n),'Name')
The problem is I want to do this without having the figure window beeing brought to the front. Is there anyway to do this with the figure still minimized or at the back?

 Respuesta aceptada

Daniel Shub
Daniel Shub el 9 de Nov. de 2011
You can do
h = get(n, 'Name')
but you might want to consider doing something like
hfig = zeros(N, 1);
for n = 1:N
hfig(n) = figure;
end
h = get(hfig(n), 'name');
This way if you have existing figures, you don't have to worry about offsets to n.

1 comentario

Jonas
Jonas el 9 de Nov. de 2011
Yes, ofcourse I dont need the 'figure' bit and can just use n directly.
I obviously need a lunch break :) Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de Nov. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by