Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

ToolTip / Right-to-left Support

Use the Tab key to move from one TextBox to the other and see how a RadToolTip which supports RTL opens on focus of the target control. Position the mouse over the Help button to recieve additional instructions.

  • Right-to-Left support


    The RadToolTip fully supports right-to-left (RTL) language locales. The tooltips are created and added to the page as children of the body element and in order to turn on the RTL support you should set dir=rtl to the html or body elements.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="C#" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <style type="text/css">
            html
            {
                direction: rtl;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>

        <script type="text/javascript">        
        
         var lastActiveToolTip = null;
         function OnClientShow(sender, args)
         {
         lastActiveToolTip = sender;
         }

            function beforeunload()
            {
                var activeTooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                if(!activeTooltip) activeTooltip = lastActiveToolTip;
                if(activeTooltip)
                {
                    var targetElement = activeTooltip.get_targetControl();
                    activeTooltip._registerMouseHandlers(targetElement, false);
                }
            };
            
            if(Sys.Browser.agent == Sys.Browser.InternetExplorer)
            {
                window.attachEvent('onbeforeunload', beforeunload);
            }

        </script>

        <telerik:RadToolTip Title="Help" runat="server" ID="RadToolTip1"
            HideEvent="ManualClose" Width="230px" ShowEvent="onmouseover" RelativeTo="Element"
            Animation="Resize" TargetControlID="link1" IsClientID="true" Position="TopRight"
            Text="Use the Tab key to move from one TextBox to the other and see how the RadToolTip opens on focus of the target control." />

        <script type="text/javascript">

            function Hilite(me, focus)
            {
                me.style.backgroundColor = false != focus ? "#ffffcc" : "white";
            }
            
          
        </script>

        <telerik:RadToolTipManager runat="server" Skin="Office2007" ID="RadToolTip5" ShowEvent="OnFocus"
            OnClientShow="OnClientShow" ShowDelay="100" AutoCloseDelay="5000" Width="300px"
            Position="MiddleRight" RelativeTo="Element" EnableShadow="true">
            <TargetControls>
                <telerik:ToolTipTargetControl TargetControlID="txtFirstName" />
                <telerik:ToolTipTargetControl TargetControlID="txtCompany" />
                <telerik:ToolTipTargetControl TargetControlID="txtEmail" />
                <telerik:ToolTipTargetControl TargetControlID="txtPosition" />
                <telerik:ToolTipTargetControl TargetControlID="txtAddress" />
            </TargetControls>
        </telerik:RadToolTipManager>
        <br />
        <br />
        <br />
        <div style="background: url(../ShowEvent/Img/bg.gif) no-repeat; width: 350px; height: 300px;
            padding: 27px 0px 50px 0; float: left;">
            <a id="link1" href="#" style="position: relative; left: -40px !important;">
                <img src="../ShowEvent/Img/help.gif" alt="" style="border: 0; margin-left: 190px;
                    margin-bottom: 87px;" /></a>
            <table style="font-size: 11px; margin-right: 70px !important;">
                <tr>
                    <td>
                        <asp:Label ID="lblFirstName" runat="server" Text="Name: "></asp:Label>
                    </td>
                    <td>
    <asp:TextBox ID="txtFirstName" onfocus="Hilite(this)" onblur="Hilite(this, false)"
    TabIndex="1" runat="server" ToolTip="Please, fill in first name, familiy name and any other initials or titles."></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblCompany" runat="server" Text="Company: "></asp:Label>
                    </td>
                    <td>
    <asp:TextBox ID="txtCompany" TabIndex="2" runat="server" onfocus="Hilite(this)" onblur="Hilite(this, false)"
    ToolTip="Company name should be spelled out with proper capitalization."></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblEmail" runat="server" Text="E-mail: "></asp:Label>
                    </td>
                    <td>
    <asp:TextBox ID="txtEmail" TabIndex="3" runat="server" onfocus="Hilite(this)" onblur="Hilite(this, false)"
    ToolTip="It is possible to list more than one email, separated by comma."></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblPosition" runat="server" Text="Position: "></asp:Label>
                    </td>
                    <td>
    <asp:TextBox ID="txtPosition" TabIndex="4" runat="server" onfocus="Hilite(this)"
    onblur="Hilite(this, false)" ToolTip="Please list current position, followed by previous positions at the company, separated by commas."></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblAddress" runat="server" Text="Address: "></asp:Label>
                    </td>
                    <td>
    <asp:TextBox ID="txtAddress" TabIndex="5" runat="server" onfocus="Hilite(this)" onblur="Hilite(this, false)"
    ToolTip="Your current mail address."></asp:TextBox>

                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" Text="Submit" runat="server" CssClass="button" />
                    </td>
                </tr>
            </table>
        </div>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451