Pregunta

I have a panel and that panel has a load of tools.

these are defined in an array, eg:

myPanel.tools = [
{
    type : 'down',
    tooltip : 'Down',
},
{
    type : 'up',
    tooltip : 'Up',
},
{
    type : 'help',
    tooltip : 'Blah Blah',
}
]

But the above is fine if the tooltip is static, but I would like it to be updated whenever the user mouses over it.

Can you pass a function to the config to call when moused over or right before its shown? Is there another way.

¿Fue útil?

Solución

tooltip excepts an config object where you can add a listener:

tooltip: {
    listeners: {
        'render': function(comp){
             comp.tooltip = "enter your tooltip";
        }
    }
}

now you can modify the component like you want.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top