就是想实现全局统一自定义的按钮宽度,我在初始化时,用:
Ext.button.Button.minWidth = 55;(55为自定义默认的宽度)
但我发现,没有效果,原因出来哪里呢?有熟悉的朋友,望指点下,谢谢

解决方案 »

  1.   

    Ext.button.Button.width 
    换这个试试吧。
      

  2.   

    width只是宽度,而minWidth是最小宽度,跟这个没关系。
    试了,width也没效果
      

  3.   

    我遇到的问题和解决方法如下:
    我出现的问题是按钮自己设置的width无效 而且页面显示出来的按钮宽度太大
     比如 英文的按钮文字 显示是这样的:文字在中间 二边预留了很大一片空白 占用了页面布局
     原来width 必须在ext-all.css里面去修改
    css 原来的代码
     .x-btn button{
        border:0 none;
        background-color:transparent;
        padding-left:3px;
        padding-right:3px;
        cursor:pointer;
        margin:0;
        overflow:visible;
        width:auto;
        -moz-outline:0 none;
        outline:0 none;*/
    }
    我修改后的代码  
    .x-btn button{
        border:0 none;
        background-color:transparent;
        padding-left:3px;
        padding-right:3px;
        cursor:pointer;
        margin:0;
        overflow:visible;
    /*width:auto;*/
        width:100%;
        -moz-outline:0 none;
        outline:0 none;*/
    }width:auto;  改为  width:100%; 后按钮宽度自己调整为最佳宽度