Creating Tooltip for Text Field in Extjs
原文網址在此
{
xtype: 'textfield',
anchor: '100%',
name: 'Alamat',
fieldLabel: 'Alamat',
emptyText: 'Alamat',
listeners : {
render: function(p) {
var theElem = p.getEl();
var theTip = Ext.create('Ext.tip.Tip', {
html: 'Tuliskan nama jalan dan nomor rumah.<br>Misal: Jl. Merak, No. 3',
margin: '0 0 0 200',
shadow: false
});
p.getEl().on('mouseover', function(){
theTip.showAt(theElem.getX(), theElem.getY());
});
p.getEl().on('mouseleave', function(){
theTip.hide();
});
}
}
},


0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁