문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top