www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@scrollTable/updateRowHeader.m
function updateRowHeader(obj) %UPDATEROWHEADER Redraw row header when turned on/off % % UPDATEROWHEADER(OBJ) creates and paints, or destroys, the row header % objects. This is typically in response to the user turning the headers % on or off. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if obj.isAlive if obj.ShowRowHeaders if obj.canPaint obj.RowHeaderObjects = obj.createObjects(obj.RowConstructor, obj.numRows, 'row'); obj.paintRowHeader; obj.send('DisplayObjectsChanged', handle.EventData(obj, 'DisplayObjectsChanged')); end set(obj.RowHeaderObjects, 'Visible','on'); else % destroy row header objects obj.deleteObjects(obj.RowHeaderObjects, 'row'); obj.RowHeaderObjects = []; obj.send('DisplayObjectsChanged', handle.EventData(obj, 'DisplayObjectsChanged')); end end