This is the snippet
{ 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(); }); } } },
Advertisements
{
xtype: ‘textfield’,
anchor: ‘100%’,
name: ‘Alamat’,
fieldLabel: ‘Alamat’,
emptyText: ‘Alamat’,
tooltip: ‘Tuliskan nama jalan dan nomor rumah’,
listeners : {
render: function(p) {
p.getEl().down(‘input’).set({‘data-qtip’: p.tooltip});
}
}
}
Thanks a lot! This really saved me