PDA

View Full Version : How to add tooltips to non button elements in paging toolbar?



Wolfgang
16 Apr 2007, 12:58 PM
How to add a tooltip to the paging toolbar for non button elements?
This code example is from ext itself:


this.prev = this.addButton({
tooltip: this.prevText,
cls: "x-btn-icon x-grid-page-prev",
disabled: true,
handler: this.onClick.createDelegate(this, ["prev"])
});
this.addSeparator();
this.add(this.beforePageText);
this.field = Ext.get(this.addDom({
tag: "input",
type: "text",
size: "3",
value: "1",
cls: "x-grid-page-number"
}).el);

How can one add a tooltip to "this.field"?
(Simply adding tooltip: 'my text' does not work)

jack.slocum
16 Apr 2007, 1:13 PM
You can go through Ext.QuickTips.register

Or this may work (untested):

this.field = Ext.get(this.addDom({
tag: "input",
type: "text",
size: "3",
value: "1",
cls: "x-grid-page-number",
'ext:qtip' : 'Try me'
}).el);

Wolfgang
17 Apr 2007, 8:17 AM
Thank you - it ("'ext:qtip' : 'Try me'") works :)