TabManager - Create Tab Panels (uitabgroup) from a GUIDE GUI

Version (41.1 KB) by Grant
Convention based method which allows a tabbed GUI to be designed using GUIDE
Updated 10 Mar 2018

View License

This class allows users to create a GUI using GUIDE that supports a tabbed UI.
Since GUIDE doesn't directly support the uitabgroup control, this class allows tabs to be created as standard panels that are at run time converted to uitab controls.
1. Create a pane with tag set to Tab? where ? is any letter or number (e.g. TabA). This main pane should be left empty and determines the size and location of the tab group (uitabgroup)
2. Create additional panes with a tag name that starts with the name of the main pane. All other controls should be added to these panes.
3. In the Guide generated function xxx_OpeningFcn add the following:
handles.tabManager = TabManager( hObject );

Cite As

Grant (2024). TabManager - Create Tab Panels (uitabgroup) from a GUIDE GUI (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Migrate GUIDE Apps in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Tab Order of children now maintained (was reversed).
Nested tabs supported (Thanks Timon)
TabManagerExample updated to show both changes.

The background colour of a placeholder panel is now copied to its corresponding uitab.

Changed the example (TabManagerExample.m) to show how to add a SelectionChangedFcn to the tab group so that a program can be notified when a user selects a tab.

A descriptive error message is now generated if a pane representing a tab is a child of the main pane (or another "tab" pane).

Modified the tab manager example to demonstrate how to select a tab from code and added a note to the TabManager class to describe how to do this.

Added note regarding the sorting of pane tag names prior to tab creation that can be used to control the order of tabs.
typo in description