View Full Version : Box Component, dynamic tool tip

1 Mar 2013, 4:45 AM
hey guyz i want to add a dynamic tooltip in my box component that changes with the change of its parent name.
please help..
thanx in advance

1 Mar 2013, 9:38 AM
You can add dynamic tooltip to any item by creating new instance of Ext.ToolTip class. You just need to define the target & html config of the instance according to your self.As you said that you want to change the tooltip of any box component on that's parent value change. After that you can call a function to change the tooltip. Review the following code:

function changeTooltip(){
var boxCmp = Ext.getCmp('id-of-boxCmp');
(boxCmp.tooltip){ // if already any tooltip added than first remove that
// then add new tooltip
boxCmp.tooltip = new Ext.ToolTip({
target: 'id-of-boxCmp'
, html: 'this is dynamic tooltip'

8 Mar 2013, 1:08 AM
It resolved my prob.