www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/+mbcgui/+widget/@ClassicTable/newCornerComponent.m

    function hnew = newCornerComponent(obj, type)
%NEWCORNERCOMPONENT Create a standard corner object
%
%  H_NEWOBJ = NEWCORNERCOMPONENT(OBJ, TYPE) returns a handle to an object that is
%  suitable for using as a corner component in a classicTable.  The input
%  TYPE specifies a style of component to create and may be chosen from the
%  following list:
%
%  TYPE                 :  DESCRIPTION
%  =====================:=========================================
%  'standard'           :  An inactive button
%  'panel'              :  A panel object

% Copyright 2015 The MathWorks, Inc. and Ford Global Technologies, Inc.

if nargin==1
    type = 'standard';
end

switch type
    case 'standard'
        hnew = uicontrol('Parent', obj.Parent, ...
            'Style', 'pushbutton', ...
            'Enable', 'inactive', ...
            'Visible','off');
    case 'panel'
        hnew = uipanel('Parent', obj.Parent, ...
            'Visible', 'off', ...
            'BorderType', 'beveledout', ...
            'Units', 'pixels');
    otherwise
        hnew = [];
end

end