Function that executes on GUI closing in matlab

冷暖自知 提交于 2019-12-09 18:16:50

问题


I am creating a GUI in matlab using guide. It's non-blocking (not calling uiwait). When the gui window is closed, I would like to execute some clean up code.

Is there an gui_ClosingFcn callback I should define in analogy to the gui_OpeningFcn template that guide creates for me?


回答1:


Figure windows have a 'DeleteFcn' property, which defines a callback function that will run when the window is closed/deleted. You could potentially use that to do your clean-up.




回答2:


Figure windows have a CloseRequestFcn property, which defines a callback function that will run when the window is closed (before deleting the window).



来源:https://stackoverflow.com/questions/3000564/function-that-executes-on-gui-closing-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!