
Icon Editor
12-35
3 Erase the color in some squares.
- Click the Eraser button on the palette
- Click in specific squares to erase those squares
- Click and drag the mouse to erase the squares that you touch.
- Click a color cell to disable the Eraser.
4 Click OK to close the GUI and return, in myicon, the icon you created – as a
32-by-65-by-3 array. Click
Cancel to close the GUI and return an empty
array
[] in myicon.
Techniques Used in the Example
This example illustrates the following GUI programming techniques:
• Creating a GUI that does not return a value until the user makes a choice.
• Retrieving output from the GUI when it returns.
• Supporting custom input property/value pairs with data validation.
• Protecting a GUI from being changed from the command line.
• Creating a GUI that runs on multiple platforms
• Sharing data between two GUIs
• Achieving the proper resize behavior
Note This example uses nested functions. For information about using
nested functions, see Nested Functions in the MATLAB documentation.
View the Completed GUI M-Files
If you are reading this in the MATLAB Help browser, you can click the
following links to display the MATLAB Editor with a complete listing of the
code that is discussed in the following sections.
Komentáře k této Příručce