Mercurial > hg > ltpda
comparison m-toolbox/classes/@repogui/cb_tabChanged.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % CB_TABCHANGED callback executed when the user changes tabs. | |
2 % | |
3 % M Hewitson 22-09-08 | |
4 % | |
5 % $Id: cb_tabChanged.m,v 1.2 2009/07/29 16:19:38 nicola Exp $ | |
6 % | |
7 | |
8 function cb_tabChanged(varargin) | |
9 | |
10 myh = varargin{1}; | |
11 edata = varargin{2}; | |
12 mainfig = varargin{end}; | |
13 | |
14 % Set tab color | |
15 set(myh, 'BackgroundColor', mainfig.Gproperties.Gcol{edata.NewValue}); | |
16 % Set status color | |
17 set(findobj(mainfig.handle, 'Tag', 'RepoguiStatusLabel'), 'BackgroundColor', mainfig.Gproperties.Gcol{edata.NewValue}); | |
18 % Set mainfig color | |
19 set(mainfig.handle, 'Color', mainfig.Gproperties.Gcol{edata.NewValue}); | |
20 | |
21 treeHndl = get(findobj(gcf,'Tag','treeHandle'),'UserData'); | |
22 | |
23 switch edata.NewValue | |
24 case 2 | |
25 if ~isempty(treeHndl) | |
26 treeHndl.setVisible(true) | |
27 else | |
28 tree = repogui.cb_treegui(); | |
29 set(findobj(gcf,'Tag','treeHandle'),'UserData',tree); | |
30 end | |
31 otherwise | |
32 if ~isempty(treeHndl) | |
33 treeHndl.setVisible(false) | |
34 end | |
35 end | |
36 | |
37 end |