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

    function pPostSetView(obj)
%PPOSTSETVIEW Notify method called after the view is set
%
%  PPOSTSETVIEW(OBJ) is called in response to the View property being set.
%  This method may be called during object construction.

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


if ~isempty(obj.View)
    obj.View.UIContextMenu = obj.UIContextMenu;
    obj.View.Visible = 'on';  % Contents of the panel should always be visible
    obj.BtnDownList = handle.listener(obj.View, 'ButtonDown', {@i_bdown, obj});
    obj.View.connect(obj, 'up');
else
    obj.BtnDownList = [];
end

set(obj.PanelHandle,'LayoutComponent',{obj.pGetLayout(obj.View)});


function i_bdown(~, ~, obj)
obj.send('ButtonDown', handle.EventData(obj, 'ButtonDown'));