Positioning problem with GUIDE

1 view (last 30 days)
Andy S
Andy S on 31 Oct 2014
Answered: Abhay Aradhya on 9 Jun 2017
I've seen this question asked but not answered. When I run my GUIDE-designed GUI, the position of elements changes. In the image below (GUIDE on left, application on right), the --- Display Summary box is drawn differently. The box within doesn't have joined corners. The elements within are spaced differently. The Tabs are different sizes.
Is there some setting that I have overlooked that is screwing this up?
  2 Comments
Sara
Sara on 31 Oct 2014
are you using normalized units?

Sign in to comment.

Accepted Answer

Abhay Aradhya
Abhay Aradhya on 9 Jun 2017
Because you are normalizing the units, the various tabs and boxes takes different sizes. That is because when you normalize you are declaring as a percentage of the parent. In your case I am guessing that it will be the "main guide window" or also called the "figure".
So in the GUIDE you will have editing tools and other stuff on your left which is not present in the application window (This can be seen in the photo you have put up), the application window thus always has a little more width than your GUIDE window hence the size of your components also tend to wary between the GUIDE and application window.
If you want it to be of fixed size then set the "Units" property to "pixels" and declare all the dimensions of your boxes, buttons and tabs in no of pixels.
popupMenu = uicontrol(topPanel,'Style','popupmenu',...
'String',solString,...
'Units','pixels',...
'Value',1,'Position',[100 250 220 50],...
'Callback',@popupmenuCallBack);
Just an example for your reference.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!