0

作成したアイコンでボタンを塗りつぶしたいのですが、何を試しても、アイコンが半分切り取られて左側に表示されるか、まったく表示されません。CSS と icon、iconcls、cls ボタン オプションのさまざまな組み合わせを試してみました。

Ext 3 ボタンの例のページに従っていましたが、何も表示されないようです...

This code is an item inside my form panel (I try to replicate this with different buttons in the panel)
{
                    xtype: 'container',
                    layout: {
                        type: 'table',
                        columns: 2,
                        tableAttrs: {
                            cellspacing: 5
                        }
                    },                  
//                  padding: 5,
                    pack: 'center',
                    align: 'middle',
                    items: [{
                        xtype: 'button',
                        width: 40,
//                      scale: 'medium',
                        ref: '../drawToolsBtn',
                        tooltip: 'Drawing Tools',
                        icon: 'img/draw.png',
                        iconAlign: 'top',
                        baseCls: 'x-plain',
//                      iconCls: 'drawBtn',
                        enableToggle: true,
//                      padding: 3,
                        toggleHandler: function(btn, state)
                        {
                            this.showDrawToolsWin(state);
                        },
                        scope: this
                    },{
                        xtype: 'label',
//                      columnWidth: 1, // remainder of container
                        padding: 3,
                        text: 'Click button to open Drawing Tools Menu'
                    }]
                }


CSS
--------------------
.drawBtn{
    background: url(../img/draw.png) !important;


}

助けてくれてありがとう!

4

1 に答える 1

0
.drawBtn{
    background-image: url(../img/draw.png) !important;
 }
于 2012-10-05T03:54:10.893 に答える