Change Button Position with resizing GUI but fix Buttons size

조회 수: 34 (최근 30일)
Lisann Lieb
Lisann Lieb 2018년 8월 21일
댓글: Image Analyst 2018년 8월 21일
Hi everybody!
I'm struggling with resizing GUIs (using guide). I want the window of the GUI to be resizable, and while resizing some of the components sgall resize too (managed this with setting the Units to 'normalized'). But I have a few Buttons and axes at the top of the GUI window which shall not change their size but adjust their position to the current window size. So they should be some kind of attached to the upper border of the window. Is there an solution for this? Thanks!

답변 (1개)

Image Analyst
Image Analyst 2018년 8월 21일
Make sure the units property of all controls on the form is set to ' normalized'.
  댓글 수: 2
Lisann Lieb
Lisann Lieb 2018년 8월 21일
I did this. The problem then is, that the components also change their size and I end up with huge buttons and icons. Therefore I just want the Buttons to change their position according to the window size
Image Analyst
Image Analyst 2018년 8월 21일
Then inspect the Position property in GUIDE. And when the figure resizes (I think there's a callback that runs when that happens), set the Position properties of the buttons to the desired size.

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

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by