Home > m > gui > ltpdv > callbacks > ltpdv_objectList_select.m

ltpdv_objectList_select

PURPOSE ^

LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the

SYNOPSIS ^

function ltpdv_objectList_select(varargin)

DESCRIPTION ^

 LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the
 workspace object list on the import panel
 
 M Hewitson 22-04-08
 
 $Id: ltpdv_objectList_select.m,v 1.2 2008/08/17 10:51:14 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ltpdv_objectList_select(varargin)
0002 % LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the
0003 % workspace object list on the import panel
0004 %
0005 % M Hewitson 22-04-08
0006 %
0007 % $Id: ltpdv_objectList_select.m,v 1.2 2008/08/17 10:51:14 hewitson Exp $
0008 %
0009 
0010 % Handles
0011 myh     = varargin{1};
0012 mainfig = varargin{end};
0013 
0014 % Structure of selection details
0015 sel = varargin{2};
0016 
0017 % Get selected rows
0018 rows = unique(sel.Indices(:,1));
0019 setappdata(mainfig, 'ObjectListSelectedRows', rows);
0020 
0021 % Set tooltip
0022 objs = getappdata(mainfig, 'LTPDAobjects');
0023 if numel(rows) == 1
0024    w = display(objs{rows});
0025    str = [];
0026    for j=1:numel(w)
0027       str = [str sprintf('\n%s', w{j})];
0028    end
0029    set(myh, 'TooltipString', sprintf('%s', str));
0030       
0031 end
0032 
0033 % END

Generated on Mon 25-Aug-2008 22:39:29 by m2html © 2003