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?

 채택된 답변

Daniel Shub
Daniel Shub 2011년 11월 9일

0 개 추천

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

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

질문:

2011년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by