Borrar filtros
Borrar filtros

How to move figure window to front of all programs?

81 visualizaciones (últimos 30 días)
Brandon
Brandon el 1 de Oct. de 2016
Editada: Raph el 29 de Dic. de 2022
Is there a way to force a figure window to show in front of all other windows (not just Matlab ones, but other programs)?

Respuesta aceptada

Walter Roberson
Walter Roberson el 1 de Oct. de 2016
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 comentario
Brandon
Brandon el 1 de Oct. de 2016
Works perfectly! I was already using WindowAPI for some things so this is even better. Thank you.

Iniciar sesión para comentar.

Más respuestas (1)

Raph
Raph el 29 de Dic. de 2022
Editada: Raph el 29 de Dic. de 2022
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

Categorías

Más información sobre Environment and Settings 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