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

ToolTip.set_Width() not working

1 Answer 114 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Vishal Dalsania
Top achievements
Rank 1
Vishal Dalsania asked on 04 Jan 2008, 09:24 AM
I have requirement in my project to resize my tooltip according to resizing of splitter.
For that I m using OnClientBeforeShow() event , and i have used following method.

 TooltipId.set_Width(NewWidth);

But i not able to see any result of this script.This is urgent so any help will be highly appreciated.
Thanks.

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 08 Jan 2008, 08:36 AM
Hello Vishal Dalsania,
I just answered your support ticket. For anyone, who might run into the same problem, I will place the information here as well:

We are aware of this issue and it is on our TODO list for the next Q. For the time being, I can offer you the following workaround:
<body>  
    <script type="text/javascript">  
    var width = 100;  
    function OnClientBeforeShow(sender, args)  
    {  
        sender.set_width(width);  
        var wrapperDiv = document.getElementById("RadToolTipWrapper_" + sender.get_id());  
        var tableElement = wrapperDiv.getElementsByTagName("TABLE")[0];  
        if(wrapperDiv && tableElement)   
        {  
            tableElement.style.width = width + "px";  
            wrapperDiv.style.width = width + 2 + "px";  
        }  
        width += 100;  
    }  
    </script>  
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" />  
        <asp:Label ID="Label1" runat="server" Text="Show tooltip"></asp:Label>  
        <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Label1" Height="100"   
            OnClientBeforeShow="OnClientBeforeShow" ManualClose="true" ContentScrolling="Both">  
        </telerik:RadToolTip>  
    </form>      
</body>  
</html> 



Kind regards,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Vishal Dalsania
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or