作成したアイコンでボタンを塗りつぶしたいのですが、何を試しても、アイコンが半分切り取られて左側に表示されるか、まったく表示されません。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;
}
助けてくれてありがとう!