GUI Warning before closed
显示 更早的评论
Hello,
would like to have a warning ( " Data saved yes no") before my GUI (made with guide) is closed. I can't figure out where to put that code. Must be something in the closing function made automatically by the GUI guide??
Thank you
采纳的回答
更多回答(2 个)
Image Analyst
2015-6-7
1 个投票
I don't think the closing function or output function will always be executed, especially if they click on the X in the title bar. To make sure your code get executed even if they try to close the window by clicking on the x in the title bar, you need to put your code into the figMainWindow_CloseRequestFcn() function.
1 个评论
Maha
2020-1-28
0 个投票
Having the same issue. I unfortunately close figures and my GUI at the same time quite often without paying attention.
Any chance to get a warning when we try to close Matlab ? Like some other programs do with "Are you sure you want to close XXX ?"
2 个评论
Nilesh Sahu
2020-9-27
Click on Home -> Preferences -> General -> Confirmation Dialogs -> Check on Confirm before exiting Matlab.
Crish
2021-1-16
Is this also applicable in the apo designer?
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!