For Programmers: Free Programming Magazines  


Home > Archive > Matlab > December 2005 > Publish a GUI









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Publish a GUI
James Brusoe

2005-12-06, 7:12 pm

I have a friendly front-end input GUI on my analysis program and
would like to include the GUI figure (with the user-specified inputs)
in the Word document I generate with the publish command. Normal
figures seem to go into the Word document with no problem... it's
only the GUI that doesn't seem to make the leap. Advice? Thank you.
us

2005-12-06, 7:12 pm

James Brusoe:
<SNIP window-to-word evergreen...

one of the solutions

plot(0:10,'o-r');
% now, copy the current canvas to the clipboard
% <ALT>+<PRT SCR>
% open word, and
% -> edit
% --> paste special
% ---> device independent bitmap

us
James Brusoe

2005-12-07, 8:02 am

I was hoping for something programmable. I want the GUI to
automatically be published in the Word document whenever the
application is used.

Is there a way to grab the handles from the GUI figure (at close,
perhaps, so that the final state of the user-supplied entries is
captured) and re-plot it as a standard non-interactive figure so that
it'll get sent to the Word document along with all of the other
normal figures?
Kelly

2005-12-07, 7:10 pm

James Brusoe wrote:

> I was hoping for something programmable. I want the GUI to
> automatically be published in the Word document whenever the
> application is used.
>
> Is there a way to grab the handles from the GUI figure (at close,
> perhaps, so that the final state of the user-supplied entries is
> captured) and re-plot it as a standard non-interactive figure so
> that
> it'll get sent to the Word document along with all of the other
> normal figures?


You could try using getframe and frame2im to save the gui figure as
an image, then replot that image in a new figure.

-Kelly
James Brusoe

2005-12-07, 7:10 pm

Thanks Kelly! I included the following code in the close button
callback:

function close_Callback(hObject, eventdata, handles)
F=getframe(gcf);
[handles.output.gui_image]=frame2im(F);
guidata(hObject,handles);

Thanks again!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com