フィルターのクリア

Positioning problem with GUIDE

3 ビュー (過去 30 日間)
Andy S
Andy S 2014 年 10 月 31 日
回答済み: Abhay Aradhya 2017 年 6 月 9 日
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 件のコメント
Sara
Sara 2014 年 10 月 31 日
are you using normalized units?
Andy S
Andy S 2014 年 11 月 21 日
yes I am

サインインしてコメントする。

採用された回答

Abhay Aradhya
Abhay Aradhya 2017 年 6 月 9 日
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 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by