movegui / OpeningFcn / simple Question / no need for more words :}

조회 수: 1 (최근 30일)
Max Müller
Max Müller 2014년 8월 6일
답변: Supreeth Subbaraya 2014년 8월 6일
Hey guys, I have two GUI`s where the 1st GUI open|starts the 2nd GUI. The Problem: In the 2nd GUI i used the Code movegui('west') and if i debug the 2nd GUI, it works perfect(-ly) However, if i open the GUI with a Call in 1st GUI the movegui-command doesn't work.
Why?
PS: the movegui('west') command is placed in the GUI opening Fnc...

채택된 답변

Supreeth Subbaraya
Supreeth Subbaraya 2014년 8월 6일
When you are calling the second gui, assign it to a handle, for example,
h = callToSecondGui;
Then use the movegui function with the handle as shown below,
movegui(h,'west');
This should move the second gui. The above solution can be used when you want to use the movegui function in the OpeningFcn of the first gui.
If you want to use the function movegui in the OpeningFcn of second gui , use it as,
movegui('west');

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 8월 6일
Is the tag property of the two GUIs the same name? That might cause it. Also, try putting the movegui() function in the output_fcn instead of the Opening_Fcn.

카테고리

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