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?

 Réponse acceptée

Image Analyst
Image Analyst le 2 Oct 2013

1 vote

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 commentaires

Jan
Jan le 2 Oct 2013
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
Alex
Alex le 2 Oct 2013
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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by