Hey everyone, does anyone know how/where to edit a GUI's closing function (if there even is one)? I'm not talking about commands like close but the X-button in the top right corner of the window. By hitting the X-button I want my GUI to call a certain function. Any ideas?

 채택된 답변

Sean de Wolski
Sean de Wolski 2014년 2월 4일
편집: Sean de Wolski 2014년 2월 4일

0 개 추천

This does execute the CloseRequestFcn of the figure:
function exampleCloseReq
figure('CloseRequestFcn',@closeme)
function closeme(src,evt);
disp('I''m closing');
delete(src)
Save this as exampleCloseReq.m

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2014년 2월 4일

편집:

2014년 2월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by