Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES

Documentation  / Solutions  / GUIKit  / Running GUIs  /

Loading GUIs

When you load an interface with GUIRun or GUIRunModal the widget definitions are turned into runtime widgets, and the graphical user interface is immediately displayed on the screen. It may be useful to break up the two-step process of turning a definition into the runtime widgets and the actual display of the resulting interface to the screen so that either existing widget properties can be modified before display, or, as a speed improvement to the user, preload the widgets and then later display the interface on screen only when requested.

GUILoad provides this functionality by loading and creating a GUIObject instance that defines the runtime classes in the same manner that GUIRun works. However, the interface is not displayed on screen. Only when you later call GUIRun, GUIRunModal, or ReleaseGUIObject on the GUIObject, will there be a visual display of the user interface.

In[1]:=

Here we use GUILoad to create the GUIObject, but there is no immediate display.

In[2]:=

Out[2]=

We are free to change some of the initial values of some of the widgets, such as the default text property of one of the input text fields.

In[3]:=

We can pass the GUIObject expression to GUIRun or GUIRunModal when we are ready to display the interface to the user. If we decided not to display the GUIObject definition, we would call ReleaseGUIObject to remove any resources and definitions created by GUILoad.

In[4]:=

Out[4]=

Here is a screen shot of what the previous user interface would look like when initially shown.

In[5]:=

Out[5]=



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


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