Mercurial > hg > ltpda
diff m-toolbox/classes/@repogui2/cb_tableSelect.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@repogui2/cb_tableSelect.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,35 @@ +% CB_TABLESELECT callback executed when a table selection is made +% +% M Hewitson +% +% $Id: cb_tableSelect.m,v 1.4 2011/04/08 08:56:36 hewitson Exp $ +% +function cb_tableSelect(varargin) + + + myh = varargin{1}; + mainfig = varargin{end}; + fieldsList = findobj(mainfig.handle, 'Tag', 'fieldsList'); + Nc = mainfig.Nconditions; + + % Get conn + conn = mainfig.connection; + + % Set fields in list + fields = repogui2.getFields(mainfig, conn); + set(fieldsList, 'Value', 1); + set(fieldsList, 'String', fields); + + % Set fields in condition drop downs + for j=1:Nc + cdbh = findobj(mainfig.handle, 'Tag', sprintf('c%02dField', j)); + set(cdbh, 'Value', 1); + set(cdbh, 'String', fields); + end + + % Build query + repogui2.buildquery(mainfig); + + mainfig.tableSelected = get(myh, 'Value'); + +end