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)
What code should I use to self-close?

Answers (1)

Rik
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)')

This question is closed.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!