필터 지우기
필터 지우기

Function of the toolbar-cross

조회 수: 5 (최근 30일)
Gerrit
Gerrit 2014년 2월 4일
편집: Sean de Wolski 2014년 2월 4일
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일
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개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by