Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to Create a NON-RESIZABLE GUI that displays properly on all screen resolutions?

5 views
Skip to first unread message

Stefanie

unread,
Feb 11, 2012, 5:46:10 PM2/11/12
to
I am trying to create a GUI using GUIDE that is NON-RESIZABLE but displays properly in all screen resolutions. I have currently built it using GUIDE with a screen resolution of 1920x1200 with font size of "small". When I open it up on a 1920X1200 font size "medium" parts of the GUI are cut off (this also obviously occurs if I have a lower resolution as well). I have created and saved the GUI in 'characters' units, as I thought this is what would allow for a resolution-independent GUI, but this does not appear to be working. When I change the units to 'normalized', this helps, provided I can then resize the GUI once opened, which I DO NOT want to give the user the ability to do. How can I turn my GUIDE created GUI into a NON-RESIZABLE GUI that will display properly on different screen resolutions?

Admin

unread,
Feb 12, 2012, 2:13:22 AM2/12/12
to
modify "GUI Opitions" --> Resize behavior --> Other (Use ResizeFcn)

Then edit "View Callbacks" --> ResizeFcn
add the following codes to line " function figure1_ResizeFcn(hObject, eventdata, handles) "

rect = get(0, 'ScreenSize');
set(hObject, 'Position', rect);

Stefanie

unread,
Feb 13, 2012, 9:28:59 AM2/13/12
to
"Admin" wrote in message <jh7oqi$jpl$1...@newscl01ah.mathworks.com>...
Thank you for your reply.
I don't think this will completely solve my problem. I know that this will still allow my GUI to be resizable, which I don't want. Is there a way then to lock that size once it adjusts so the user cannot adjust the size of the window?

Thank you!

Steven_Lord

unread,
Feb 13, 2012, 10:04:53 AM2/13/12
to


"Stefanie " <stefanie...@gmail.com> wrote in message
news:jhb6nb$7sj$1...@newscl01ah.mathworks.com...
Set the figure's Resize property to 'off'.

http://www.mathworks.com/help/techdoc/ref/figure_props.html#Resize

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Michael

unread,
Aug 7, 2012, 11:29:24 AM8/7/12
to
The code will enlarge the window over two screeens, if you have two screens connected to your computer!

CU
Mike
0 new messages