www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@columnTable/columnTable.m
function obj = columnTable( varargin ) %COLUMNTABLE Constructor function for columnTable % % H = COLUMNTABLE(PROP1, VAL1, ...) % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin && isa(varargin{1}, 'mbcwidgets.columnTable') obj = varargin{1}; varargin(1) = []; else obj = mbcwidgets.columnTable; end obj.scrollTable(varargin{:}); obj.vSliderbar = uicontrol('Parent', obj.Parent, ... 'Style', 'slider', ... 'Visible', 'off', ... 'Callback', {@i_scroll_vert, obj}); obj.gridObject = xreggridbaglayout(obj.Parent, ... 'packgroup', 'TABLE_GRIDS', ... 'packstatus', 'on', ... 'position', obj.position); connect(obj.gridObject, obj, 'up'); obj.ShowRowHeaders = false; % Setup this class obj.doSetupCTable; obj.pPostSetPosition([]); % Check for an empty table - need to force an initial paint here if this is the % case if ~obj.isAlive obj.doSetupGrid; end function i_scroll_vert(src, evt, obj) obj.CurrentRow = -round(get(src, 'Value'));