Specifications
ii Contents
Setting Properties for GUI Components . . . . . . . . . . . . . . . . 2-11
Name Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Title Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
String Property for Push Buttons and Static Text . . . . . . . . . . 2-12
String Property for Pop-up Menus . . . . . . . . . . . . . . . . . . . . . . 2-12
Callback Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
The Tag Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Programming the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Creating the GUI M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Opening the GUI M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Sharing Data Between Callbacks . . . . . . . . . . . . . . . . . . . . . . . 2-19
Adding Code to the Opening Function . . . . . . . . . . . . . . . . . . . 2-20
Adding Code to the Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Using the Object Browser to Identify Callbacks . . . . . . . . . . . 2-24
Saving and Running a GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
3
Laying Out GUIs and Setting Properties
Using GUIDE Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Blank GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
GUI with Uicontrols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
GUI with Axes and Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Modal Question Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Using the Layout Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Starting the Layout Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Selecting Components from the Component Palette . . . . . . . . 3-10
Adding Components to the Layout Area . . . . . . . . . . . . . . . . . . 3-13
Working with Components in the Layout Area . . . . . . . . . . . . 3-16
Running the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Saving the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Renaming GUI Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Exporting a GUI to a Single M-File . . . . . . . . . . . . . . . . . . . . . 3-21
Displaying the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22