6 Lay Out a UI Using GUIDE
If Max-Min is less than or equal to 1, the edit text component admits only a single
line of input. If you specify a component width that is too small to accommodate the
specified string, MATLAB software displays only part of the string. The user can
use the arrow keys to move the cursor through the entire string. On all platforms,
when the user enters a single-line text box via the Tab key, the entire contents is
highlighted and the editing cursor is at the end (right side) of the string.
- If you want to set the position or size of the component to an exact value, then modify
its Position property. See “Locate and Move Components” on page 6-74 and
“Resize GUIDE UI Components” on page 6-67 for details. - You specify the text font to display in the edit box by typing the name of a font
residing on your system into the FontName entry in the Property Inspector. On
Microsoft Windows platforms, the default is MS Sans Serif; on Macintosh and
UNIX® platforms, the default is Helvetica.
TipTo find out what fonts are available, type uisetfont at the MATLAB prompt; a
dialog displays containing a list box from which you can select and preview available
fonts. When you select a font, its name and other characteristics are returned in
a structure, from which you can copy the FontName string and paste it into the
Property Inspector. Not all fonts listed may be available to users of your UI on their
systems.
Static Text
To create a static text component with text Select a data set, as shown in this figure: