www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@scrollTable/updateColumnHeader.m
function updateColumnHeader(obj) %UPDATECOLUMNHEADER Redraw row header when turned on/off % % UPDATECOLUMNHEADER(OBJ) creates and paints, or destroys, the column 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.ShowColumnHeaders if obj.canPaint obj.ColumnHeaderObjects = obj.createObjects(obj.ColumnConstructor, obj.numCols, 'col')'; obj.paintColumnHeader; obj.send('DisplayObjectsChanged', handle.EventData(obj, 'DisplayObjectsChanged')); end set(obj.ColumnHeaderObjects, 'Visible','on'); else % destroy row header objects obj.deleteObjects(obj.ColumnHeaderObjects, 'col'); obj.ColumnHeaderObjects = []; obj.send('DisplayObjectsChanged', handle.EventData(obj, 'DisplayObjectsChanged')); end end