www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@itemList/pDisplay.m
function pDisplay(obj, FROMLIST) %PDISPLAY Regenerate list % % PDISPLAY(OBJ) recreates the list from the ItemList property of the % component. % % PDISPLAY(OBJ, FROMLIST) specifies whether the redraw should use the % current order of the items in the list to generate a new list where % items are ordered the same as previously. For this to work, the ItemList % property should not have changed since the list was last updated using % PDISPLAY(OBJ). % Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc. % Get information for items info = obj.pListDisplayDetails; % Default for FROMLIST is true if nargin==1 FROMLIST = true; end obj.pSetListDetails( info ); if FROMLIST % Make sure the sorting is re-applied obj.Display.Peer.sort(); else % Clear the sorting obj.Display.Peer.clearSort(); end % Select any selected items obj.pUpdateTable( 'SelectedIndex' );