Borrar filtros
Borrar filtros

how can i get and save my running gui snapshot with a pushbutton?

1 visualización (últimos 30 días)
Rajneesh Sharma
Rajneesh Sharma el 21 de En. de 2015
Respondida: Chris el 21 de En. de 2015
help

Respuestas (1)

Chris Barnhart
Chris Barnhart el 21 de En. de 2015
1) Assuming the gui is 1 figure - can use saveas (Or possibly snapnow which I've never used.)
2) Create a callback function within the gui code to save the image. Something like.
function gui_save_callback(h_obj, data) saveas(h_obj, 'filename.png', 'png'); end
3) Create the button object on the gui. button_handle = uicontrol('style','pushbutton','position',[10 170 50 20], 'string','SAVE GUI','Callback',@gui_save_callback);
I added this uicontrol just after creating the gui figure.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by