File Exchange

image thumbnail

Multiple Tab GUI

version (4 KB) by James Willmann
Program to create a figure with multiple tabs and demo their use.


Updated 04 Feb 2014

View Version History

View License

This function creates a figure with multiple Tabs. The number of tabs can be changed and they are distributed evenly across the top of the figure. Content is provided for the first 5 tabs to demo the program. The demo uses the screen size to adjust the size of the figure. The program uses the ~ character for unused arguments, so if you are not using 2009b, these should be changed to dummy arguments (lines 210 and 234). guidata is set to the TabHandles cell array and is used to pass all arguments and data to the functions.

Cite As

James Willmann (2020). Multiple Tab GUI (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (26)


thank you

Ka Mirul

I also use several button to switch panel dispaly to create multi tab GUI.
I've made step by step tutorial ( Enjoy

Ronald DeSpain

Does anyone know if a 'GUIDE' figure can be embedded in another 'GUIDE' figure? This seems a natural way to build complex GUIs by combining simpler GUIs, just like subroutines are used in coding. Or if this is possible in 'appdesigner'?

Tarique Ahmad

Great Source of learning, as well--


How to change the horizontal tabs into Vertical ?

narisa jittangboonya

Michaela Siskova

zahid bhatti



excellent !
Thank you very much for this !

How can i add a text box in tab 6 to input a text or number from the user?
And i also need a box that can display some text as result.

I tried a lot. But as a beginner in matlab programming, I am totally confused !

can anyone help me? pls...

Huipeng Chen

DangDang Lang

Excellent work!

Katherine Beaulieu

How would you change this to allow resizing of your gui?


Thanks its really good.


Thank you very much for this, very useful !


Does it work for R2007b version?


Thank you Michael, I will give it a try then!


Very nicely done. I can confirm that this works on 2013a


Hello, has anyone tried to run this on MATLAB R2013a? Or alternatively, know of another submission that creates tabs and runs on R2013a?


Thanks a lot.

Cheol Hee


Really love it !

Amjad Elshenawy

Excellent work


Neat and well commented code...Love it, good job

Donghyun Kim

Very very very good!


im using R2008a plz tl me wht dummy arguments tht i hav 2 use???

Rody Oldenhuis

Good work!

IMHO, The Mathworks should really unmystify and properly document and implement UITAB() and related functions.

One thing I personally like better: togglebuttons i.s.o. pushbuttons, it shows more clearly which tab is selected.

Also a possible improvement: let TabDemo accept input arguments, like a custom figure handle and TabLabels etc. It can also return the TabHandles array after creating the tabs, which can be used to construct custom GUIs, but that may be too general for your intentions.

Anyway, it looks good. Well commented, proper errorhandling, well written, just good.

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Inspired: Simple Optimized GUI Tabs

Community Treasure Hunt

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

Start Hunting!