uitab
Creates a tab in a tabbed frame for interactive graphical control objects in a figure.
Syntax
h = uitab(parent)
h = uitab(parent, property, value, ...)
Inputs
- parent
- Handle of a container object, which is a uitabgroup.
- property, value
-
- 'enable'
- Specifies if h is enabled. Valid values are 'on'(default) and 'off'.
- 'fontangle'
- Specifies the angle of the displayed font; applies to all tabs in this group. Valid values are 'regular'(default) and 'italic'.
- 'fontname'
- Specifies the name of the displayed font; applies to all tabs in this group.
- 'fontsize'
- Specifies the size of the displayed font; applies to all tabs in this group.
- 'fontweight'
- Specifies the weight of the displayed font; applies to all tabs in this group. Valid values are 'normal'(default) and 'bold'.
- 'iconpath'
- Path to the icon to be displayed next to uitab name.
- 'parent'
- Specifies the parent (uitabgroup).
- 'position'
- Position and size of h. Value is specified as a vector of the form:
- 'title'
- Text to be displayed on h.
- 'tag'
- User-defined string to tag graphical control objects.
- 'units'
- Specifies units of measurement. Valid values are
'pixels'(default) and 'normalized'.
- 'pixel'
- Indicates that h has a fixed size and position specified by 'position'.
- 'normalized'
- Indicates that h is resized if parent is resized.
- 'userdata'
- User-defined numerical data.
- 'visible'
- Specifies if h is visible. Valid values are 'on'(default) and 'off'.
Outputs
- h
- Handle of the uitab created.
Example
% Creates a tab group in the current figure
h = uitabgroup(gcf())
% Creates individual tabs
tab1 = uitab(h, 'title', 'My tab 1')
tab2 = uitab(h)
% Creates uicontrol elements in individual tabs
edithandle = uicontrol(tab1,'style','edit','string','169','units','normalized','position',[0.1 0.15 0.15 0.15]);
lst10 = uicontrol(tab2, 'Style','listbox','units','normalized', ...
'String',{'data1','data2','data3','data4','data5','data6','data7'},'max',3,'min',0,'value',[2,3],
'visible', 'on', 'units','normalized','position',[0.1 0.1 0.15 0.15]);