User`s guide
Add Code for Components in C allbacks
For more information about subplots, see the subplot reference page. For
information about adding panels to your G UI, see “Add Components to the
GUIDE Layout Area” on page 6-31.
ActiveX Control
This example program s a sample ActiveX control Mwsamp Control.Itfirst
enables a user to change the radius of a circle by clicking on the circle. It then
programs a slider on the GUI to do the same thing.
• “Programming an ActiveX Control” on page 8-49
• “Programming a User Interface Control to Update an ActiveX Control”
on page 8-55
This topic also discusses:
• “Viewi ng the Methods for an ActiveX Control” on page 8-56
• “Saving a GUI That Contains an ActiveX C ontrol” on page 8-57
• “Compiling a GUI That Contains an ActiveX Control” on page 8-58
See “Creating COM Objects” to learn more about ActiveX controls.
Note GUIDE enables ActiveX controls to resize automatically if the figure is
resizable. If you are creating a GUI with ActiveX controls outside o f GUIDE,
you can use the resizing technique described in “Example — Using Internet
Explorer
®
Program in a MATLAB Figure”.
Programming an ActiveX Control
The sample ActiveX control Mwsamp Control contains a circle in the
middle of a square. This example programs the control to change the circle
radius when the user clicks the circle, and to update the label to display the
new radius.
If you a re reading this in the MATLAB Help browser, you can click the
following links to display the GUIDE Layout Editor and the MA TLAB Editor
with a completed version of the following example.
8-49