Creating Graphical User Interfaces Previous page   Next Page

Getting Started with GUIDE

What Is GUIDE?

Starting GUIDE

The Layout Editor

GUIDE Templates

Running a GUI

GUI FIG-Files and M-Files

Programming the GUI M-file

Editing Version 5 GUIs with Version 7 GUIDE

Saving the GUI in Version 7 GUIDE

Updating Callbacks

Creating a GUI

Designing the GUI

Laying Out the GUI

View Layout and Code for the Example

Open a New GUI in the Layout Editor

Set the GUI Figure Size

Add the Components

Align the Components

Setting Properties for GUI Components

Name Property

Title Property

String Property for Push Buttons and Static Text

String Property for Pop-up Menus

Callback Properties

The Tag Property

Programming the GUI

Creating the GUI M-File

Opening the GUI M-File

Sharing Data Between Callbacks

Adding Code to the Opening Function

Adding Code to the Callbacks

Using the Object Browser to Identify Callbacks

Saving and Running a GUI

Laying Out GUIs and Setting Properties

Using GUIDE Templates

Blank GUI

GUI with Uicontrols

GUI with Axes and Menu

Modal Question Dialog

Using the Layout Editor

Starting the Layout Editor

Selecting Components from the Component Palette

Adding Components to the Layout Area

Working with Components in the Layout Area

Running the GUI

Saving the Layout

Renaming GUI Files

Exporting a GUI to a Single M-File

Displaying the GUI

Layout Editor Preferences

Layout Editor Context Menus

Selecting GUI Options

Configuring the GUI M-File

Resize Behavior

Command-Line Accessibility

Generate FIG-File and M-File

Generate Callback Function Prototypes

GUI Allows Only One Instance to Run (Singleton)

Using the System Background Colors

Generate FIG-File Only

Aligning Components in the Layout Editor

Aligning Groups of Components -- The Alignment Tool

Grids and Rulers

Aligning Components to Guide Lines

Front-to-Back Positioning

Setting Component Properties -- The Property Inspector

Displaying the Property Inspector

What Properties Do I Need to Set?

Some Commonly Used Properties

Setting Properties for Some Specific Components

Callback Properties

Changing Tag and Callback Properties

Viewing the Object Hierarchy -- The Object Browser

Creating Menus -- The Menu Editor

Defining Menus for the Menu Bar

Menu Callbacks

Defining Context Menus

Setting the Tab Order

The GUIDE Tab Order Editor

Setting the Tab Order Programmatically

Programming GUIs

Understanding the GUI M-File

Sharing Data with the Handles Structure

Functions and Callbacks in the M-File

Opening Function

Output Function

Callbacks

Input and Output Arguments

Programming Callbacks for GUI Components

Toggle Button Callback

Radio Buttons

Check Boxes

Edit Text

Sliders

List Boxes

Pop-Up Menus

Panels

Button Groups

Axes

ActiveX Controls

Figures

Managing GUI Data with the Handles Structure

Example: Passing Data Between Callbacks

Managing Application Data

Designing for Cross-Platform Compatibility

Using the Default System Font

Using Standard Background Color

Cross-Platform Compatible Figure Units

Types of Callbacks

Callback Properties for All Graphics Objects

Callback Properties for Figures

Callbacks for Specific Components

Which Callback Executes

Adding a Callback

Interrupting Executing Callbacks

Controlling Interruptibility

The Event Queue

Event Processing During Callback Execution

Controlling Figure Window Behavior

Using Modal Figure Windows

Example: Using the Modal Dialog to Confirm an Operation

View Completed Layouts and Their GUI M-Files

Setting Up the Close Confirmation Dialog

Setting Up the GUI with the Close Button

Running the GUI with the Close Button

How the GUI and Dialog Work

GUI Applications

GUI with Multiple Axes

Techniques Used in the Example

View Completed Layout and Its GUI M-File

Design of the GUI

Plot Push Button Callback

List Box Directory Reader

View Layout and GUI M-File

Implementing the GUI

Specifying the Directory to List

Loading the List Box

Accessing Workspace Variables from a List Box

Techniques Used in This Example

View Completed Layout and Its GUI M-File

Reading Workspace Variables

Reading the Selections from the List Box

A GUI to Set Simulink Model Parameters

Techniques Used in This Example

View Completed Layout and Its GUI M-File

How to Use the GUI (Text of GUI Help)

Running the GUI

Programming the Slider and Edit Text Components

Running the Simulation from the GUI

Removing Results from the List Box

Plotting the Results Data

The GUI Help Button

Closing the GUI

The List Box Callback and Create Function

An Address Book Reader

Techniques Used in This Example

Managing Shared Data

View Completed Layout and Its GUI M-File

Running the GUI

Loading an Address Book Into the Reader

The Contact Name Callback

The Contact Phone Number Callback

Paging Through the Address Book -- Prev/Next

Saving Changes to the Address Book from the Menu

The Create New Menu

The Address Book Resize Function

Working with Callbacks (Draft)

Introduction to GUI Callbacks

What Is a Callback?

Kinds of Callbacks

GUI Files

GUIDE M-Files and FIG-Files

Files for Programmatically Created GUIs

Associating Callbacks with Components

Defining Callback Properties

Callback Properties in GUIDE

Component and Figure Callbacks

Callback Conventions in GUIDE

Callbacks in Programmatically Created GUIs

Initialization Callbacks in GUIDE

Opening Function

Output Function

Managing Application-Defined Data

Mechanisms for Managing Data

Adding Fields to a Data Structure

Sharing Data Among a GUI's Callbacks

Properties That Control Component Behavior

General Information About the Component

Information About Component State

Properties that Affect Callback Execution

Properties that Affect Component Access

Examples of Callbacks for GUI Components

Toggle Button Callback

Radio Buttons

Check Boxes

Edit Text

Sliders

List Boxes

Pop-Up Menus

Panels

Button Groups

Axes

ActiveX Controls


Previous page  Creating Graphical User Interfaces Getting Started with GUIDE Next page

© 1994-2005 The MathWorks, Inc.