This is a migrated thread and some comments may be shown as answers.

RadToolTip instead of RadToolTipManager AutoTooltipify

2 Answers 74 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 26 Oct 2009, 05:00 PM
I have a RadToolTipManager set up with AutoTooltipify to change all of my tooltips to be RadToolTips.  These have no particular sizes because they are all the small img alts, etc.

Now I have the need to take a particular ToolTip and make the size 400x350 with scrolling but I am finding that the ToolTip is still falling under the RadToolTipManager. 

Any suggestions on a work around?

2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 29 Oct 2009, 08:13 AM
Hi Christian,

As far as I understand from your explanation, the problem in your case comes from the fact that you do not know how to reference the particular tooltip in order to change its size.

If so, I suggest to do the following:

1) Hook up the OnClientShow or OnClientBeforeShow event.
2) Find the best way to detect the tooltip in your case, e.g check its text (get it through the get_text() method) and compare it to the text of the partcicular tooltip. If the text is the same, this is the tooltip you need and you can change its size through the client-side API mnethods. If it is not, do nothing.

I hope that my suggestion is helpful, let us know in case you need further assistance.

Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Christian
Top achievements
Rank 1
answered on 29 Oct 2009, 03:10 PM
Hi Sventlina,

You pointed me in the right direction.  I wanted to resize tooltips with large text since the ToolTipManager seemed to randomly pick a size.

I ended up using the OnClientBeforeShow event:

 

function OnClientBeforeShow(sender, eventArgs) {  
    if (sender.get_text().length > 150) {  
        var tooltipTable = sender._tableElement;  
        if (tooltipTable) {  
            tooltipTable.style.width = "400px";  
            tooltipTable.style.height = "350px";  
        }  
        else {  
            tooltip.set_width("400px");  
            tooltip.set_height("350px");  
        }  
 
        sender.set_contentScrolling(0);  
    }  
}  
 

Thanks for your help

Tags
ToolTip
Asked by
Christian
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Christian
Top achievements
Rank 1
Share this question
or