MATLAB Creating Graphical User Interfaces

(Barry) #1

10 Lay Out a Programmatic UI


The default value of the NextPlot axes property, 'replace' allows the graphing
functions to reset many property values. In addition, the 'replace' property value
allows MATLAB to remove all callbacks from the axes whenever a graph is plotted.
If you create an axes in a UI window, consider setting the NextPlot property to
'replacechildren'. You might need to set this property prior to changing the contents
of an axes:

ax.NextPlot = 'replacechildren';

ActiveX Controls


ActiveX components enable you to display ActiveX controls in your UI. They are available
only on the Microsoft Windows platform.

An ActiveX control can be the child only of a figure. It cannot be the child of a panel or
button group.

See “Creating an ActiveX Control” about adding an ActiveX control to a figure. See
“Creating COM Objects” for general information about ActiveX controls.

How to Set Font Characteristics


Use the FontName property to specify a particular font for a user interface control, panel,
button group, table, or axes.

Use the uisetfont function to display a dialog that allows you to choose a font, style,
and size all at once:

myfont = uisetfont
Free download pdf