www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregtools/@MBrowser/doDrawText.m

    function doDrawText(h,p)
% DODRAWTEXT  update labels on Mbrowser
%
%  doDrawText(h)

%  Copyright 2000-2016 The MathWorks, Inc. and Ford Global Technologies, Inc.

if nargin<2
    p=h.CurrentNode;
end

fname = p.name;
subname= p.ChildType;

hnd=h.Hand;

hnd.Figure.Text(2).String = [p.NodeType, ': ' p.name];

set(hnd.Figure.BestMdlTxt ,'String',p.BestModelString);

newlbl= ['Ne&w ' subname '...'];
dellbl= ['&Delete ' fname];

set([hnd.Menubar.NewX; hnd.Menubar.DeleteY], {'Label'}, {newlbl; dellbl});
set(h.ContextMenus.NewMenus,'Label',newlbl);
set(h.ContextMenus.DeleteMenus,'Label',dellbl);

% new and delete toolbar tooltips
set([hnd.Toolbar.buttons(6); hnd.Toolbar.buttons(7)], ...
    {'TooltipString'},...
    {['New ',subname]; ['Delete ',fname]});

set(hnd.Figure.ListText,'String',[subname,'s']);

nm=['Model Browser - ' h.RootNode.projectfile];

set(h.Figure,'Name',nm);