www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@toGVRowHeader/pSwitchWideDisplay.m
function pSwitchWideDisplay(obj) %PSWITCHDISPLAY Private method that effects the switching to/from wide mode % % PSWITCHDISPLAY(OBJ) changes the object between WideHeaderMode % on and off % Copyright 2000-2013 The MathWorks, Inc. and Ford Global Technologies, Inc. grid = get(obj.hBorder, 'LayoutComponent'); if obj.WideHeaderMode if isempty(obj.hValueLabel) || ~isgraphics(obj.hValueLabel) % Create the value label obj.hValueLabel = uicontrol('Parent', obj.hBorder, ... 'Style', 'text', ... 'HorizontalAlignment', 'left'); el = get(grid, 'elements'); el{1} = obj.hValueLabel; set(grid, 'elements', el); end else if ~isempty(obj.hValueLabel) && isgraphics(obj.hValueLabel) delete(obj.hValueLabel); obj.hValueLabel = []; el = get(grid, 'elements'); el{1} = []; set(grid, 'elements', el); end end