www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@cgbrowser/renamenode.m

    function ok = renamenode(h)
%RENAMENODE Rename a node
%
%  RENAMENODE(CGB) renames the current node.  This is done by
%  programmatically intiating a label edit on the tree or list item.

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


if h.GUIExists
    if h.TreeOn
        h.Hand.Figure.Tree.startEdit;
    else
        h.Hand.Figure.List.startEdit;
    end
    ok = true;
else
    ok = false;
end