sencha の背景画像をパネルに設定したい:
編集
Ext.define('components.NewPanel', {
extend: 'Ext.Panel',
style: {
background:'#ffffff',
backgroundImage: 'url(icon.PNG)',
backgroundSize: '10% 85%',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'bottom left',
},
initialize: function () {
var newIcon=Ext.create('Ext.Img', {
src: "image1.png",
cls: "img",
scope: this,
listeners: {
tap: {
fn :function (img, evt) {
Ext.Msg.alert("This is a test");
},// function
}// tap
}//listeners
});//create
this.add([newIcon]);
},
config: {
layout: {
type: 'fit'
}
}
});
しかし、何も表示されません。何をすべきか?どんな助けでも大歓迎です。