Hi,
I am using GUIDE and when I try to resize the figure, nothing happens, and in the MATLAB command window, I get the following error:
Warning: Cannot set Position while WindowStyle is 'docked'
> In guidefunc>resizeFigure at 2693
In guidefunc at 116
I understand figures' position property cannot be set when docked, but how do I undock the GUIDE? I thought I could
set(h,'windowstyle','normal')
but I can't seem to find the figure handle. I tried using the method below:
findall(0,'type','fig')
ans =
Empty matrix: 0-by-1

답변 (2개)

Image Analyst
Image Analyst 2012년 7월 6일

4 개 추천

  1. In GUIDE, double click on your main figure's background - in any unoccupied space. This will being up the Property Inspector.
  2. Scroll way down to the last item in the Property Inspector. It is a property called WindowStyle.
  3. Change the WindowStyle property from docked to normal.
  4. Resize your figure. The warning will not appear back in the main MATLAB command window anymore.

댓글 수: 1

Jon
Jon 2019년 5월 9일
Very helpful this was just the answer I was looking for. Worked exactly as described

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

Walter Roberson
Walter Roberson 2012년 7월 6일

3 개 추천

Try
findall(0,'type','figure')
If there is only one figure then you can get its handle with
gcf
as in
set(gcf, 'Windowstyle', 'normal')

카테고리

도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2012년 7월 6일

댓글:

Jon
2019년 5월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by