User`s guide
11 Lay Out a Programmatic GUI
Note On Mac p latforms, the height of a horizo ntal s lide r is co n strained. If
the height you set in the position vector excee ds this constraint, the displayed
height of the slider is the maximum allowed. The height element of the
position vector is not changed.
The slider component provides no text description or data entry capability.
Use a “Static Text” on page 6-48 component to label the slider. Use an “Edit
Text” on page 6-46 component to enable a u ser to input a v alue tp apply to
the slider.
Static Text
The following statement creates a static text component with handle sth:
sth = uicontrol(fh,'Style','text', ...
'String','Select a data set.',. ..
'Position',[30 50 130 20]);
The first argument, fh, specifies the handle of the parent figure. You can also
specify the parent as a panel or button group. See “Panel” o n page 11-35 and
“Button Group” on page 11-36 for more information.
The
Style property, text, specifies the user interface control as a static text
component.
The
String property defines the text that appears in the component. If you
specify a component width that is too small to accommodate the specified
String, MATLAB software wraps the string.
11-30