필터 지우기
필터 지우기

GUI jumps back into its default position, set position

조회 수: 1 (최근 30일)
Gerrit
Gerrit 2014년 2월 12일
I've created twi GUIs. When using a pushbutton in the first one, the second one is supposed to open in the same position as the first one. My code in the first GUI is p = get(gcf,'OuterPosition'); % get position of this GUI setappdata(0,'p',p); % write position into root directory second_GUI; % open another GUI
My code in the second GUI is p = getappdata(0,'p'); % get position from root directory set(gcf,'position',p); % set position of this GUI
It works BUT as soon as I move the first GUI a slight bit off-screen the second GUI will open in that off-screen position but then jump back into its default-position immediatly.
Any ideas?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by