Control appearance and behavior of tab group
The properties listed here are valid for tab groups in GUIDE or
in apps created with the
figure function. If you are
using App Designer or the
uifigure function, see TabGroup Properties instead. For more information, see Migrating GUIDE Apps to App Designer.
Tab groups are containers for grouping and managing tabs. Properties control the appearance and behavior of a tab group. Use dot notation to refer to a particular object and property.
f = figure; tg = uitabgroup(f); tg.Position = [.1 .1 .8 .8];
TabLocation— Tab label location
Tab label location, specified as
'right'. This property specifies the location of the
tab labels with respect to the tab group.
SelectedTab— Currently selected tab
Currently selected tab, specified as a
Use this property to determine the currently selected tab within a tab group. You can also use this property to set the default selection.
The default value of the
SelectedTab property is the
first tab that you add to the tab group.
Visible— Tab group visibility
Tab group visibility, specified as
determines whether the tab group displays on the screen. If the
Visible property is set to
'off', the entire tab group is invisible, but you can
still specify and access its properties.
Changing the size of an invisible container triggers the
SizeChangedFcn callback if and when the container
Visible property of a container does
not change the
property of its child components even though hiding the container
prevents its children from displaying.
SelectionChangedFcn— Selection changed callback
''(default) | function handle | cell array | character vector
Selection changed callback, specified as one of these values:
A function handle.
A cell array in which the first element is a function handle. Subsequent elements in the cell array are the arguments to pass to the callback function.
A character vector containing a valid MATLAB expression (not recommended). MATLAB evaluates this expression in the base workspace.
This callback function executes when the user selects a different tab within the tab group.
If you set the
SelectionChangedFcn property to a
function handle (or cell array containing a function handle), MATLAB passes a
SelectionChangedData object containing event data as the
second argument to the callback function. This object contains the
properties described in the following table. You can access these properties
inside the callback function using dot notation. For example, if the second
argument in your callback is called
event.NewValue returns the currently selected
Component that executes the callback
For more information about specifying a callback property value as a function handle, cell array, or character vector, see How to Specify Callback Property Values.
Parent— Parent object
Parent object, specified as a
Tab object. Use this
property to specify the parent container when creating a tab group or to
move an existing tab group to a different parent container.
GraphicsPlaceholderarray (default) | 1-D array of component objects
TabGroup children, returned as an empty
GraphicsPlaceholder or a 1-D array of component
objects. The children of
TabGroup objects are
You cannot add or remove children using the
property. Use this property to view the list of children or to reorder the
children. The order of the children in this array reflects the order of the
tabs displayed on the screen.
To add a child to this list, set the
property of the child component to be the
Objects with the
'off' do not list in the
Type— Type of graphics object
This property is read-only.
Type of graphics object, returned as