How to get invisible panel to resize with figure window?

조회 수: 2 (최근 30일)
Clayton Birchenough
Clayton Birchenough 2018년 5월 27일
답변: Robert Huggins 2020년 12월 26일
Hey!
I'm using two uipanels stacked in a figure window. I make one invisible, and I was wondering if it was possible to make this invisible uipanel resize when the figure window was resized. I'm using 2017b.

답변 (2개)

Walter Roberson
Walter Roberson 2018년 5월 27일
If you define the Position of the uipanel in terms of Units 'normalized' then the panel will maintain constant relative portions.
However if the uipanel visible is 'off' and you set the uipanel units to any absolute unit such as pixels or mm, then MATLAB defines that the Position property will not get updated until the uipanel is rendered -- even if only by
set(the_handle, 'visible', 'on'); set(the_handle, 'visible', 'off')
Chances are that there will be no visible change if you immediately set the visibility off again, but all relevant properties will be recalculated when visible is set on.

Robert Huggins
Robert Huggins 2020년 12월 26일
I have a panel on my fig that disapeared ,shows up when I run but I somehow moved it (using 2008b) with object browser I managed to move it back to where it should be but it would be nice to get it so I can see it and edit it
The Title shows up but no border to panel !
Any ideas ?
Bob Huggins

카테고리

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