Positioning problem with GUIDE
2 views (last 30 days)
Show older comments
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
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!