No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.8 | 18 ratings Rate this file 18 Downloads (last 30 days) File Size: 7.72 KB File ID: #11546 Version: 1.0
image thumbnail



Shiying Zhao (view profile)


26 Jun 2006 (Updated )

A complete implementation of TabPanel for MATLAB

| Watch this File

File Information

This is a complete implementation of TabPanel for MATLAB, which offers a consistent look and feel to the builtin MATLAB UI objects.

Two types of tabpanels are implemented. The first type is the usual tabpanel with tabs positioned on left/center/right top/bottom in relation to the visible panel. The second one is the so-called "popup" panels. This type of "tabpanels" is common in Windows and Java but has not been seen its use in MATLAB. I found that it is rather convenient in many occasions.

See the screenshot and "uitabdemo.m" to get started.


Tab Panel Example, Tabpanel, Tab Panel (Yet Another One), and Tab Panel Constructor V2.8 (2010) inspired this file.

This file inspired Simple Optimized Gui Tabs.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (22)
20 Mar 2015 curoi

curoi (view profile)

Does this work with GUIDE?

Comment only
29 Aug 2013 Luca

Luca (view profile)

16 Jul 2013 Sébastien MAILFERT

10 Jun 2013 RyanJ

RyanJ (view profile)

I have a quick question, if I have a figure with one tab panel (containing 5 or so tabs), how do I save that figure so that when I open it from the .fig file, all the tabs remain functional. Currently if I save the figure, when I reopen it, only the tab that I was on when I saved is still functional and the others are not responsive. Thanks!

Comment only
14 May 2011 Clayton Chu

Is there a callback associated with making a tab active? I am really hoping there is, but I can't find one. I want to resize the figure window based on the currently opened tab.

Comment only
20 Oct 2010 Ying

Ying (view profile)

Very good

09 Sep 2010 Sean Blackman


Great functionality! However, I am having trouble getting the Figure Toolbar to recognize the correct axes when they are on different tabs. As soon as I click on the 3D Rotate button and try to click on the desire axes, it changes the CurrentAxes to the first axes created, not the one I have set as active. Any ideas?

Again, great program!

11 May 2010 Samuele

Hi, i was wondering if there is a way to switch between tab without mouse clicking. I.e i load some data in a tab and then the program automatically switch to the processing tab without user tab selection. Thank you, samuele

20 Jan 2010 Danila

Danila (view profile)

Excellent implementation!

13 Jan 2010 Spencer Alexander

Great code! Thanks a bundle!

I had issues with the same line as Saidual... when trying to embed the tabpanel in a figure other than the current figure, errors were being thrown.
I changed line 126 from:
cmenu = uicontextmenu;
cmenu = uicontextmenu('parent',parent);
Any my problems have since gone away.

29 Dec 2009 Adrian Wanner

06 Jul 2009 Saidul Hasnan

If you find errors when trying to add uitabpanel inside another uitabpanel. You might want to replace the following codes:

cmenu = uicontextmenu;
uimenu(cmenu,'Label','Goto Tab');


while ~findfigure

cmenu = uicontextmenu('Parent',testparent);
uimenu(cmenu,'Label','Goto Tab');


Saidul Hasnan

09 Mar 2009 Jveer

Jveer (view profile)

good looking GUI

09 Mar 2009 Roi

Roi (view profile)

16 Oct 2008 Bharathiraja UN

I am withdrawing my last comment on code modification. Instead, it is better done as follows,
htab = uitabpanel(...
where as ResizeTab is the custom made resize function. Thanks.

Comment only
16 Oct 2008 Bharathiraja UN

It is working well.
I wish to suggest to modify line320-321 as follows to avoid some issues faced in resizing.

14 Mar 2008 Franklin Quilumba

It is so great...

06 Jun 2007 paolo castiglione

very good job! I hope newer versions of matlab will implement a tab function.

28 Jan 2007 Liu Changkun

Excellent! Very GOOD!

20 Jan 2007 Aaron Sui

Wonderful work! However I find it troublesome working with more that one figures.

12 Aug 2006 Mirjam B

07 Jul 2006 Benoît Muth

Outstanding work has been done here. Running the demo and exploring the scripts is enough to judge about the quality of this effort. I am really looking forward to see UITABPANEL implemented as a Matlab class like other objects. Anyway, thank you already!

Contact us