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*

 채택된 답변

laila bsr
laila bsr 2015년 7월 10일

1 개 추천

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*

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

질문:

2015년 7월 10일

답변:

2015년 7월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by