Borrar filtros
Borrar filtros

Save specific portion of GUI screen

1 visualización (últimos 30 días)
fichtorious
fichtorious el 23 de En. de 2013
Hi All,
I have a GUI screen that I created with GUIDE. It has two axes plots, some static text fields, buttons and check boxes. I want to save a specific portion of the screen when I hit the save button without printing the buttons or check boxes. I tried:
print(gcf,'-noui','-djpeg',fileName);
but this leaves out the static text fields on the save/print. I was wondering if anyone had any solutions to this. I'd be open to trying anything.

Respuesta aceptada

Walter Roberson
Walter Roberson el 23 de En. de 2013
ctl = findall(gcf, 'type', 'uicontrol', '-regexp', 'Style', 'checkbox|pushbutton');
ctl_state = get(ctl, 'Visible');
set(ctl, 'Visible', 'off');
print(gcf, '-djpeg', fileName);
set(ctl, 'Visible', ctl_state);

Más respuestas (0)

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