Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

GUIScreenShot

A useful GUIKit function used within these pages is GUIScreenShot[obj], which provides a convenient way of generating a Mathematica Raster graphic of the current state of the runtime user interface. GUIObjects, any J/Link Java user interface object, interface expressions, or even string resource names of widget definitions can be arguments to the function. GUIScreenShot is useful for creating previews of a definition within a notebook, documenting changes during the runtime of an interface, and also as an easy way of exchanging and submitting bug and problem reports to others.

In[1]:=
In[2]:=
Out[2]=
In[3]:=

When we pass a GUIObject in, the state of the interface is captured and left unchanged, but when passing in a widget definition expression, it is created, captured, and then closed assuming it is no longer needed.

By default, if we give a widget to GUIScreenShot, it is asked to "paint" itself into the resulting image so we only get the widget requested without the underlying native window.

Note we can also request individual widgets in the GUIObject to capture.

Even though this is a GUIKit-defined function, GUIScreenShot works with any active user interface JavaObject produced by any J/Link code.

Finally, as a convenience, we can specify screen coordinates of the form {{xmin, xmax},{ymin, ymax}} to GUIScreenShot to use the "Grab" method and capture any rectangle of the current screen or no arguments that will attempt to grab the entire screen's contents.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: