PDA

View Full Version : Dynamic Tool tip for Form Control



ajit.mankottil
21 Jul 2014, 1:22 AM
Hi, I have add the tool tip on textfield at afterRender event. It is working but I want to update the tooltip base on some condition after get the data from database. How can I update?

Thanks,
Alex

Here is my current method.


var txtMake = {
xtype: 'textfield',
fieldLabel: 'Make',
id: 'txtMake',
name: 'Make',
anchor: '95%',
readOnly: true,
qtip: 'This is a tip from Form!'
};



Ext.override(Ext.form.Field, {
afterRender: Ext.form.Field.prototype.afterRender.createSequence(function () {
var qt = this.qtip;
if (qt) {
Ext.QuickTips.register({
target: this,
title: '',
text: qt,
enabled: true,
showDelay: 20
});
}
})
});

slemmon
28 Jul 2014, 1:25 PM
Hi,

Try unregistering / registering the tooltip with a setter method like in this example:

85t