Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Get handle of a GUI to resize operation

조회 수: 1 (최근 30일)
Alessandro Russo
Alessandro Russo 2016년 4월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi all, i have a GUI to resize, because in some different resolutions i get overlapping static text; so i found that the correct syntax to get an automatic resize should be (correct if i'm wrong):
scrsz = get(0,'ScreenSize');
set(%GUI handle here,'position', [(scrsz(3)-300)/2 (scrsz(4)-600)/2 800 700])
The problem is, how to get the figure handle? i can't use gcf because it's not the main GUI, but a second one opened in order to set some parameters, so if i use gcf it just get the main GUI handle. Thanks everyone!
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2016년 4월 4일
Alessandro - have you used GUIDE to create your GUI, or have you created it programmatically? If the former, then you can access the handle to your GUI using the handles structure, typically as
handles.figure1

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by