How to change the CloseRequestFcn ??

13 vues (au cours des 30 derniers jours)
laila bsr
laila bsr le 10 Juil 2015
I've tried to modify the CloseRequestFcn and add a questdlg but it doesn't work :/ Here is the code I used: *
function mymenu_CloseRequestFcn(obj, event, handles)
selection = questdlg('Save data?',...
'','Yes','No');
switch selection,
case 'Yes',
delete(hObject);
case 'No'
return
end*

Réponse acceptée

laila bsr
laila bsr le 10 Juil 2015
Hey I found a solution I added :
*set(handlesname,'CloseRequestFcn',@myrequest)*
and the code is :
function myrequest(obj, event, handles)
selection = questdlg('Save data?',...
'','Yes','No');
switch selection,
case 'Yes',
delete(hObject);
case 'No'
return
end*

Plus de réponses (0)

Catégories

En savoir plus sur App Building 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