Function of the toolbar-cross

1 回表示 (過去 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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by