Function open/close for GUI

조회 수: 26 (최근 30일)
Nico
Nico 2016년 4월 11일
답변: Nico 2016년 4월 14일
Hello In the GUI, does it exist a function which is read only one, at the opening and the close (to declare variable or resize GUI...)? I have tried "*_OutputFcn" and "*_InputFcn" but these functions are called each time the figure is updated. Thank you

채택된 답변

Adam
Adam 2016년 4월 11일
OpeningFcn
is called on GUI creation and
CloseRequestFcn
is called when the GUI closes, but you have to explicitly add this in GUIDE by right-clicking on the figure in GUIDE and choosing the callback. Then you can put code in it.
DeleteFcn
is also called when the window closes. I forget the differences between this and CloseRequestFcn now, but off the top of my head the CloseRequestFcn should delete the gui (which will call DeleteFcn) otherwise it will not get deleted.

추가 답변 (1개)

Nico
Nico 2016년 4월 14일
Thanks a lot Adam for your response and your reactivity, it helps me a lot.

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by