Borrar filtros
Borrar filtros

Setting the GUI window always at center

26 visualizaciones (últimos 30 días)
William
William el 28 de Mzo. de 2013
Comentada: Jessa Juarez el 21 de Oct. de 2021
Hi
I am trouble with setting my GUI window at the center of the computer screen whenever i click on the 'run' button to start the program. May I know is there a easy way to preset it in the OpeningFcn of the code?

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 28 de Mzo. de 2013
doc movegui
And:
movegui(gcf,'center')
  5 comentarios
JZH
JZH el 4 de En. de 2018
hey Sean, I got the following error, and it seems like movegui doesn't support GUI designed in app designer?
movegui(app.ELD_GUI, 'center') Error using matlab.ui.Figure/set Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer. Error in movegui (line 278) set(fig, 'OuterPosition', newpos);
Jessa Juarez
Jessa Juarez el 21 de Oct. de 2021
Hi @JZH, I used movegui(app.UIFigure, 'center') and it worked for app designer.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by