How to set my gui width as the screen width

Hi, I try to set the width of my Gui to the user screen width.
I try: ScreenDimensions = get(0,'ScreenSize'); GuiDimensions = [0 0 ScreenDimensions(4) ScreenDimensions(3)]; set(myGui,'Position',GuiDimensions);
where 'myGui' is the background figure of the gui. It's dont work... i try eval and cast to int.
any idea?
Thanks

 Respuesta aceptada

Sean de Wolski
Sean de Wolski el 14 de Dic. de 2011
Just use normalized figure units (range from 0 to 1) and it'll take up the whole screen:
figure('units','norm','Position',[0 0 1 1]);
To get what you have above working (and you're almost there!) you'd have to set the figure units to pixels because that's what the screen size is measured in.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

avi
el 14 de Dic. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by