File Exchange

image thumbnail

Tab panel Copy

version 1.2.0.0 (11 KB) by Arturo Serrano
Creates replicas of a panel created using GUIDE that works like a tab panel.

2 Downloads

Updated 25 Jun 2009

View License

TABPANELCOPYFCN Helper function for tabpanelcopy
Creates replicas of a panel created using GUIDE that works like a tab
panel.
Handles of the reference controls in the handles struct are updated every
time you change the active tab, so you can access them in the normal way.

Steps:
1. Create a reference panel with controls with GUIDE.
2. Initialize tab panel passing the handle of the panel.
tabpanelcopyfcn ('initialize', panel);
3. Add a tab when you need it.
tabpanelcopyfcn ('add_tab', panel, 'title', handles);

Cite As

Arturo Serrano (2020). Tab panel Copy (https://www.mathworks.com/matlabcentral/fileexchange/24346-tab-panel-copy), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Great! Thanks for rating.

Cordelle

nevermind, I got the program working. it was cleverly coded and very useful. Great Job!

Cordelle

I apologize for asking so many questions but i have been working on the code for like 10 hours now and nothing as been working for me. I found out what my uipanel was, now the error message says:

Undefined function or variable 'fcn'.

Error in tabpanelcopyfcn (line 40)
switch fcn

what does that mean?

Cordelle

how can I find out what will be a valid uipanel handle? I am using matlab R2013a.

This is a general error not related with the program. handles.TabSample must be a valid uipanel handle.

Cordelle

when I tried to implement the same code to understands the process; an error message occured stating:

Reference to non-existent field 'TabSample'.

Error in TabSample>TabSample_OpeningFcn (line 61)
tabpanelcopyfcn ('initialize', handles.TabSample);

Error in gui_mainfcn (line 221)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in TabSample (line 42)
gui_mainfcn(gui_State, varargin{:});

Great programm!!!! And very useful when you want to plot different plots of the same application.

Updates

1.2.0.0

Solved a problem that avoided using uipanels inside the tabpanel.

1.1.0.0

Screenshot.

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Tab panel example