Effacer les filtres
Effacer les filtres

Function of the toolbar-cross

5 vues (au cours des 30 derniers jours)
Gerrit
Gerrit le 4 Fév 2014
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?

Réponse acceptée

Sean de Wolski
Sean de Wolski le 4 Fév 2014
Modifié(e) : Sean de Wolski le 4 Fév 2014
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

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by