GUI screen size keeps changing from where I set it

Hello,
I'm having troubles keep my gui screen size the size I set it in guide. Every time I run the Gui and have it call to other guis then back to the main one, the main one has gotten larger. This also happens to all the other guis i call to. does anyone know how to hard set the size of the gui in guide so that the size i choose is the size it stays?

 Accepted Answer

I do this all the time and that does not happen. What are the units of your main GUI set to? Mine are all set to Normalize. Then let's see the code (for example the push button callback) where you call your second GUI and then return to the main GUI. Third, have you stepped though this line by line in the debugger to see exactly what line of code the resizing is happening on?

3 Comments

Exactly. GUIs do not change their size without a reason. So search for the commands, which causes the observed changes.
% --- Executes on button press in DRAW_INLET_CONDITIONS.
function DRAW_INLET_CONDITIONS_Callback(hObject, eventdata, handles)
% hObject handle to DRAW_INLET_CONDITIONS (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
filemenufcn(gcbf,'FileSave')
close all
uiopen('DRAW_INLET_Solution_RECIRC.fig',1);
this is how i'm calling to other guis. there ins't any code in my programs that tells it to change size. i'll try setting units to normalize.
thank you
the problem was the units everything was in. I placed everything where i wanted it to stay. selected all of the parts, set their units to normalized then resized the gui and set the gui units to normalized. now when i call to all my guis they stay the same size. thank you for mentioning units. didn't know that was something you could change.

Sign in to comment.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Asked:

on 2 Oct 2013

Commented:

on 2 Oct 2013

Community Treasure Hunt

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

Start Hunting!