How To Add Tooltip To Text Form Field In Extjs6
I have function for creating/rendering input fields but i don't know how to add tool tip on it in EXTjs6 this is my function: createInputField: function(value, fieldsMarginBottom,
Solution 1:
As can be seen in the textfield
docs, fields do not have a way to add a tooltip to their configuration, so you would have to create the tooltip manually.
If you look at the docs for Ext.tip.ToolTip
how to do that, you may find a small example, where you just have to change the target as per the target
configuration description:
var tip = Ext.create('Ext.tip.ToolTip', {
target: nameField.getEl(),
html: 'Press this button to clear the form'
});
Solution 2:
Above answer is correct. Here is example of generic function which you write once and use wherever you required in project by using using attributes.
addToolTip : function (id, msg) {
new Ext.ToolTip({
target : id,
dismissDelay : 0,
anchor : 'right',
html : msg
});
};
Post a Comment for "How To Add Tooltip To Text Form Field In Extjs6"