Cannot close figure using CloseFunctionRequest
古いコメントを表示
Hello,
I have created a gui using figure and a collection of uicontrols but I now find that I can't close the figure once I'm done with it. I can press the cross in the top right corner and the code runs satisfactorily but the figure won't disappear. Close(gcf) won't work but delete(gcf) will. The code was borrowed from the answer to this post: Answer, but here's my code stripped out to leave only the bits that I think are relevant:
function UserInput_short(S)
hfig = figure('CloseRequestFcn',@close_req_fun);
uiwait(hfig)
function close_req_fun(~,~)
uiresume
end
end
If I run the above I get a blank figure which I can't close using the cross at top right. What am I doing wrong?
Thanks.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
