PDA

View Full Version : TriggerField: Icon tooltip



vikky_25
24 Apr 2009, 5:32 AM
I would need to set a tooltip for the TriggerField Icon.
Please suggest me a way if anyone knows how.

Thanks!

Animal
24 Apr 2009, 6:28 AM
Write a plugin for the TriggerField class which attaches a ToolTip to the trigger element.

vikky_25
24 Apr 2009, 7:55 AM
I've found the way to add the tooltip text for the trigger icon:



var mytriggerField = new Ext.form.TriggerField({
...
});

mytriggerField.on("render", function() {
Ext.QuickTips.register({
target: this.trigger,
title: "Some title",
text: "Actual tooltip message"
});
}, this);

bt_bruno
24 Apr 2009, 8:20 AM
Another one, using triggerConfig



...{
xtype:'trigger'
,triggerConfig:{
tag: "img"
,src: Ext.BLANK_IMAGE_URL
,cls: "x-form-trigger myTriggerClass"
,'ext:qtip':'test'
}
}
...