Info
This question is closed. Reopen it to edit or answer.
How does the figure window show a photo and close itself in matlab gui ?
2 views (last 30 days)
Show older comments
What code should I use to self-close?
0 Comments
Answers (1)
Rik
on 25 Jan 2019
Use this in a callback:
close(gcbf)
Example:
f=figure(1);clf(1)
uicontrol('parent',f,...
'units','normalized',...
'position',[1/3 1/3 1/3 1/3],...
'String','Close me!',...
'Callback','close(gcbf)')
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!