Save specific portion of GUI screen

1 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2013-1-23
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);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by