How to make my window close on a timer
2 次查看(过去 30 天)
显示 更早的评论
does any one known how to make a timer so that it closes the window that im using? Im trying to make a window pop up in GUI stay for like 20 seconds then close on its own. Please help
1 个评论
Geoff Hayes
2014-8-27
Rainaire - what kind of window are you popping up? Another GUI or some kind of dialog?
回答(1 个)
Bruno Pop-Stefanov
2014-8-29
>> f = figure;
>> t = timer('ExecutionMode','singleShot','StartDelay',20,'TimerFcn',@(~,~)close(f));
>> start(t)
5 个评论
Jan
2018-7-4
@Asit Kumar: You mean a window, which does not belong to Matlab? This is new question, so please open a new thread.
Asit Kumar
2018-7-4
Please follow the link to a new question. Thank you.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!