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

    function w = pGetWidth(obj)
%PGETWIDTH Return expected width of button
%
%  W = PGETWIDTH(OBJ) returns the expected width of the button.  Normally
%  this value will be respected when a button is asked to render, but
%  buttons should slways be prepared to render appropriately at any size.

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


w = size(obj.CData,2) + 7;