Add Components to a Programmatic UI
bar, you can uses this behavior to indicate how much of the document is currently visible
by changing the value of major_step.
'Position',[30 20 150 30] specifies the location and size of the slider. In this
example, the slider is 150 pixels wide and 30 high. It is positioned 30 pixels from the left
of the figure and 20 pixels from the bottom.
Note:On Mac platforms, the height of a horizontal slider is constrained. If the height you
set in the Position property exceeds this constraint, the displayed height of the slider is
the maximum allowed by the system. However, the value of the Position property does
not change to reflect this constraint.
Static Text
This code creates a static text component:
f = figure;
t = uicontrol(f,'Style','text',...
'String','Select a data set.',...
'Position',[30 50 130 30]);