Mercurial > hg > ltpda
diff m-toolbox/classes/@repogui/cb_fieldSelect.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/@repogui/cb_fieldSelect.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,28 @@ +% CB_FIELDSELECT callback executed when a field is selected +% +% M Hewitson +% +% $Id: cb_fieldSelect.m,v 1.2 2011/04/08 08:56:26 hewitson Exp $ +% +function cb_fieldSelect(varargin) + + + mainfig = varargin{end}; + + %---- Set the order by field to the first in this list + + % Get selected fields + fieldList = findobj(mainfig.handle, 'Tag', 'fieldsList'); + fieldsStr = get(fieldList, 'String'); + vals = get(fieldList, 'Value'); + fields = fieldsStr(vals); + + orderBy = findobj(mainfig.handle, 'Tag', 'fieldOrderBy'); + set(orderBy, 'Value', 1); + set(orderBy, 'String', fields); + + + % Build query + repogui.buildquery(mainfig); + +end