www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcmultiview/@MultiViewPanel/pSetViewLayout.m

    function pSetViewLayout(obj, hDisplay)
%PSETVIEWLAYOUT Set the layout to display
%
%  PSETVIEWLAYOUT(OBJ, HDISPLAY) sets HDISPLAY as the view for the
%  component.  HDISPLAY may be either a View object or a splitlayout.

%  Copyright 2005-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.



el = get(obj.hTopLayout, 'elements');
if ~isempty(el)
    delete(el{1});
end
set(hDisplay, 'UserData', {obj.hTopLayout, 1});
set(obj.hTopLayout, 'elements', {hDisplay});