www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@scrollTable/getObjectAt.m

    function h = getObjectAt(obj, R, C)
%GETOBJECTAT Return display object at specified row and column
%
%  H = GETOBJECTAT(OBJ, R, C) returns the handle to the display object that
%  is currently drawing at Row R and Column C.  If the specified cell is
%  not visible, an empty matrix is returned.  If R = 0 or C = 0, the
%  appropriate row or column header will be returned.

%  Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc.


if obj.isCellVisible(R, C)
    if R==0
        C = C - obj.CurrentColumn + 1;
        h = obj.ColumnHeaderObjects(C);
    elseif C==0
        R = R - obj.CurrentRow + 1;
        h = obj.RowHeaderObjects(R);
    else
        R = R - obj.CurrentRow + 1;
        C = C - obj.CurrentColumn + 1;
        h = obj.MainObjects(R, C);
    end
else
    h = [];
end