필터 지우기
필터 지우기

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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by