User`s guide
Initialize a Programmatic GUI
Initialize a Programmatic GUI
When you open a GUI, it usually initializes certain data structures and
variable values. These actions can include:
• Defining variables for supporting input and output arguments. See
“Declare Variables for Input and Output Arguments” on page 12-4.
• Defining default values for input and output arguments.
• Defining custom property values used for constructing the components. See
“Define Custom Property/Value Pairs” on page 12-4.
• Processing com mand line input arguments.
• Creating variables used by functions that are nested below the initialization
section of the code file. See “Nested Functions”.
• Defining variables for sharing data between GUIs.
• Returning user output when requested.
• Updating or initializing components.
• Changing or refining the look and feel of the GUI.
• Adapting the GUI to work across platforms. See “Design Programmatic
GUIs for Cross-Platform Compatibility” on page 11-94.
• Hiding the GUI until all i ts components are ready to use. See “Make the
Figure Invisible” on page 12-5.
• Showing the GUI when it is ready for the user to see it.
Group these tasks together rather than scattering them throughout the
code. If a n initialization task is long or complex, consider creating a utility
function to do the work.
Typically, some initialization tasks appear in the code file before the
components are constructed. Others appear after the components are
constructed. Initialization tasks that require the components must appear
following their construction.
12-3