-
2 May 2012 9:50 AM #1
Tooltips Not Displaying
Tooltips Not Displaying
I have a panel that with dynamically added components. I wanted to add tooltips to the dynamic links but they do not display on hover. This is my code.
Why does this not display a tooltip? What am I missing?Code:if (readonly) { component = new Ext.Component( { name: 'combo' + item.dbName, html: ' <a style="border-bottom:1px dashed black;"><b>' + listItems[0].value + '</b></a>', autoEl: { tag: 'span' } }); this.add(component); tip = new Ext.tip.ToolTip( { target: component.name, html: tipText, showDelay: 500, dismissDelay: 3000 // Hide after 3 seconds hover }); this.add(tip); }
-
7 May 2012 8:28 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
You can add 'data-qtip' attribute to DOM elements like your <a> element and when you mouse over the element it will automatically show the tooltip for you. There is an example here: http://docs.sencha.com/ext-js/4-1/#!...uickTipManager
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
8 May 2012 6:32 AM #3
Thanks - I'll check out using the quicktip. Support suggested I use the component id for the target versus the component name. I added an id to my component, tested, and it worked. Appreciate the reply.


Reply With Quote