www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@uitoolbar/remove.m

    function remove(obj,butobj)
%REMOVE Remove a button from a toolbar
%
%  REMOVE(OBJ, BUTTON) removes the specified button from a toolbar.

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


% % During deletion, the renderer is the first object to be destroyed. We
% % need to check whether this is still a valid handle
% if ~isempty(obj.Children) && ishandle(obj.hRenderer)
%     ind = find(butobj==obj.Children);
%     if ~isempty(ind)
%         obj.Children(ind) = [];
%         obj.hRenderer.notifyRemoval(butobj, ind);
%     end
% end

if ishandle(obj.hRenderer)
    obj.hRenderer.notifyRemoval(butobj)
end