Handling the size of MATLAB GUI programmatically?

조회 수: 3 (최근 30일)
Sudhanshu Goel
Sudhanshu Goel 2016년 10월 27일
댓글: Sudhanshu Goel 2016년 11월 8일
I have a matlab GUI whose resize behavior property is set to "Proportional". This is good if I want to increase the size of GUI i.e. the size of all components (Pushbuttons etc.) increase in proportion to the size of GUI figure. The problem occurs when I reduce the size of GUI figure. Reducing the size beyond a point distort the shapes and appearance of GUI components.
What I want is a way by which I can fix a minimum size of my GUI and from there it can be resized proportionally.

채택된 답변

Jan
Jan 2016년 10월 27일
I tried a lot inside Matlab without success: Catching the position in the ResizeFcn and setting it to a specific limit, did not work reliably. Therefore I've used the Java method in http://mathworks.com/matlabcentral/fileexchange/38527-limit-figure-size. Unfortunately this failed in R2011b, but I assume it is working in modern Matlab versions again.
  댓글 수: 3
Sudhanshu Goel
Sudhanshu Goel 2016년 10월 27일
Thanks a lot Simon. You answers are always helpful.
Sudhanshu Goel
Sudhanshu Goel 2016년 11월 8일
Simon I am having an error in line 147. it says:-
Struct contents reference from a non-struct array object

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

추가 답변 (1개)

Adam
Adam 2016년 10월 27일

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by