Setting Delays and Opening new Form, Closing old forms in GUI

Hi all
Is there a way to create a delay (example: 3sec) for a button after pressed in GUI1?
Also, how should I open a new form (GUI2) and close the GUI1 from previous with a button?

 채택된 답변

Wouter
Wouter 2013년 3월 20일
편집: Wouter 2013년 3월 20일
you can set a 3 second delay by (this does pause matlab entirely though):
pause(3)
you can open a new gui using:
GuiFunction(input1,input2,etc...)
where GuiFunction is the function name of GUI2
You can close a current gui using:
delete(handles.figure1);
where figure1 is the label of the current figure window (belonging to gui1).

댓글 수: 2

hi Wouter
for open a new gui, what do you mean by input1,input2,etc...?
because, let's say i have a simple plain GUI1, with a pushbutton (Next) for which it will close GUI1 and open GUI2 with a delay of 3 sec.
haha ok i have just tried and found out that input1 and input2 and etc is not needed for me thus i leave it () empty instead to open new form gui2. once again thanks a lot for the tips!!!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2013년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by