필터 지우기
필터 지우기

Specifying attributes of objects created in GUIDE

조회 수: 2 (최근 30일)
Kim
Kim 2019년 4월 24일
댓글: Kim 2019년 4월 24일
I'm creating a UI using GUIDE. It is important that I position items in the UI in exact locations. I can only approximately position objects using the mouse to move the objects around. Is there a command line method to specify - for instance - exact coordinates of a button's position i.e., [1.0, 1.0, 2.0, 1.5]?

채택된 답변

Dennis
Dennis 2019년 4월 24일
If you want to do this in guide you can get there in 3 steps:
1.) right click on your object
2.) chose 'Property Inspector'
3.) go to 'Location and Size' (Group Properties) or 'Position (List Properties)
  댓글 수: 2
Kim
Kim 2019년 4월 24일
That was the first thing I tried, but the location and position fields aren't editable in the Property Inspector.
Kim
Kim 2019년 4월 24일
Wooops, I'm a little slow. I didn't notice that 'Position' can be opened, then you can edit x, y, width, and height.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Alex Mcaulley
Alex Mcaulley 2019년 4월 24일
편집: Alex Mcaulley 2019년 4월 24일
set(handles.yourButton,'Units', 'pixels') %If your position is in pixels
set(handles.yourButton,'Position', [1.0, 1.0, 2.0, 1.5])
  댓글 수: 1
Kim
Kim 2019년 4월 24일
yeah, except set and get don't seem to work when you're doing GLIDE.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by