File Exchange

image thumbnail

Multiple Tab GUI

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

20 Downloads

Updated 04 Feb 2014

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.

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 (https://www.youtube.com/watch?v=d3-kd4HUtic). Enjoy

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'?

Great Source of learning, as well--

Mohammed

How to change the horizontal tabs into Vertical ?

excellent

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...

Excellent work!

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

preeti

Thanks its really good.

Magali

Thank you very much for this, very useful !

Rakshitha

Does it work for R2007b version?

ziggy

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

Michael

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

ziggy

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

Lipika

Thanks a lot.

Cheol Hee

Vu

Really love it !

Excellent work

Isaac

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

Very very very good!

ishan

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

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.

Updates

1.2.0.0

I improved the look of the tabs. They now blend into the selected sheet below the selected tab. Also cleaned up the code a bit and tested with the latest version, R2013b.

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

Inspired: Simple Optimized GUI Tabs