MATLAB Functions Help Desk

uisetfont

Purpose

Interactively select a font

Syntax

Description

uisetfont displays a dialog box and creates a Text graphics object with the font properties selected in the dialog box.

uisetfont(handleIn) displays a dialog box and applies the selected font attributes to the Text or Axes graphics object specified by handleIn. uisetfont uses the font properties currently assigned to this object to initialize the dialog box.

uisetfont('dialogTitle') displays a dialog box with the title 'dialogTitle' and creates a Text graphics object with the font properties selected in the dialog box.

uisetfont(handleIn,'dialogTitle') applies the selected font attributes to the Text or Axes graphics object specified by handleIn and assigns the title 'dialogTitle' to the dialog box. The arguments can appear in any order.

handleOut = uisetfont(...) returns the handle handleOut. If you specify handleIn, handleOut is identical to handleIn. If you do not specify handleIn, uisetfont creates a new Text object using the selected font properties, and returns its handle. If you press the Cancel button or an error occurs, handleOut is set to handleIn, if provided, or to 0.

Example

Interactively change the font for a Text graphics object by displaying a dialog to update the font:

See Also

axes, text, uicontrol



[ Previous | Help Desk | Next ]