
Examples: Programming GUI Components
8-37
Compiling a GUI that Contains an ActiveX Control
If you use the MATLAB Compiler mcc command to compile a GUI that contains
an ActiveX control, you must use the
-a flag to add the ActiveX file, which
GUIDE saves in the current directory, to the CTF archive. Your command
should be similar to this
mcc -m mygui -a mygui_activex1
where mygui_activex1 is the name of the ActiveX file. See the MATLAB
Compiler documentation for more information. If you have more than one such
file, use a separate
-a flag for each file. You must have installed the MATLAB
Compiler to compile a GUI.
Menu Item
The Menu Editor generates an empty callback subfunction for every menu
item, including menu titles.
Programming a Menu Title
Because clicking on a menu title automatically displays the menu below it, you
may not need to program callbacks at the title level. However, the callback
associated with a menu title can be a good place to enable or disable menu
items below it.
Consider the example illustrated in the following picture.
Commenti su questo manuale