comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_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 function ltpdv_tabChanged(varargin)
2
3 myh = varargin{1};
4 edata = varargin{2};
5 % get old tab
6 ti = edata.OldValue;
7 tabs = get(myh, 'Children');
8 if ti > 0
9 oth = tabs(ti);
10
11 % Find all java objects below oth
12 jobjs = findobj(oth, 'Type','uitabgroup');
13 set(jobjs, 'Visible', 'off')
14
15 end
16
17 if ti > 0
18 % get new tab
19 ti = edata.NewValue;
20 tabs = get(myh, 'Children');
21 nth = tabs(ti);
22
23 % Find all java objects below oth
24 jobjs = findobj(nth, 'Type','uitabgroup');
25 set(jobjs, 'Visible', 'on');
26 end
27 drawnow
28
29 h = findobj(myh, 'Tag', 'LTPDVimportTabPanel');
30 if h~=myh
31 set(h, 'SelectedIndex', 1);
32 end
33
34 end