필터 지우기
필터 지우기

How to move figure window to front of all programs?

조회 수: 81 (최근 30일)
Brandon
Brandon 2016년 10월 1일
편집: Raph 2022년 12월 29일
Is there a way to force a figure window to show in front of all other windows (not just Matlab ones, but other programs)?

채택된 답변

Walter Roberson
Walter Roberson 2016년 10월 1일
If you are using MS Windows you could experiment with using the 'topmost' command in Jan's File Exchange contribution https://www.mathworks.com/matlabcentral/fileexchange/31437-windowapi
  댓글 수: 1
Brandon
Brandon 2016년 10월 1일
Works perfectly! I was already using WindowAPI for some things so this is even better. Thank you.

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

추가 답변 (1개)

Raph
Raph 2022년 12월 29일
편집: Raph 2022년 12월 29일
This question is ambiguous, but I think what "most people" would be looking for searching for an answer to this question are the following:
How to bring to the front a specific figure handle?
h = figure;
h2 = figure;
% bring figure with handle h to the front
figure(h);
How to bring to the front a known figure with a given name?
figure('Name','A cool figure'); % create a figure and assign a unique name
allfigs = findall(0,'Type', 'figure'); % finds the handles of figures
desiredHandle = findall(allfigs, 'Name', 'A cool figure'); % finds the handles of figure with the unique name
if numel(desiredHandle)==1 % make sure its not deleted or actually is a valid handle
figure(desiredHandle(1)); % brings to front
end

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by