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 / Hide on Event

The HideEvent property enables fine-tuning of when a tooltip will be hidden. You can test it below:





  • RadToolTip's HideEvent

    RadToolTip used to provide ManualClose and Sticky properties which were used to control when the tooltip should hide. These properties are now obsolete and you should use the HideEvent property to control when the tooltip will disappear.
    The HideEvent property is an enum and can take the following values, which names describe the effect when they are set:
    • Default
    • FromCode
    • LeaveTargetAndToolTip
    • LeaveToolTip
    • ManualClose

    Notes

    1. Setting the HideDelay property to a big value will provide the user with more time to move the mouse from target element over the tooltip The default setting is 300 milliseconds (1/3 second)
    2. A tooltip, regardless of its HideEvent setting will hide when a new tooltip is to be shown, because by design there can be only one RadToolTip visible on the page at any give time

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.ToolTip.HideEvent.DefaultVB" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server" />
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadFormDecorator ID="decorator" runat="server" DecoratedControls="All" />
            <div class="bigModule" style="margin-bottom: 40px">
                <div class="bigModuleBottom">
                    The <strong>HideEvent</strong> property enables fine-tuning of when a tooltip will
                    be hidden. You can test it below:
                </div>
            </div>
        <br />
        <br />
        <telerik:RadAjaxPanel ID="panel" runat="server">
            <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
                <asp:ListItem Value="Default" Selected="True"><strong>Default</strong> - hides when mouse is out of the target element</asp:ListItem>
                <asp:ListItem Value="FromCode"><strong>FromCode</strong> - hides by explicit javascript call to its hide method</asp:ListItem>
                <asp:ListItem Value="LeaveTargetAndToolTip"><strong>LeaveTargetAndToolTip</strong> - hides when mouse is neither over the tooltip, nor over the target element</asp:ListItem>
                <asp:ListItem Value="LeaveToolTip"><strong>LeaveToolTip</strong> - hides when user hovers the tooltip and then leaves it</asp:ListItem>
                <asp:ListItem Value="ManualClose"><strong>ManualClose</strong> - hides when user presses the [x] button of the tooltip</asp:ListItem>
            </asp:RadioButtonList>
            <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Width="220" EnableShadow="true" Height="150"
                OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" RelativeTo="Element">
            </telerik:RadToolTipManager>
        </telerik:RadAjaxPanel>
        <br />
        <br />
        <div>
            <asp:Repeater runat="server" ID="Repeater1" OnItemDataBound="Repeater1_ItemDataBound">
                <HeaderTemplate>
                    <table border="0" cellpadding="0" cellspacing="0" style="background: url(Images/bg.gif) no-repeat;
                        width: 586px; height: 156px;">
                        <tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <td style="width: 25%; text-align: center; vertical-align: middle;">
                        <asp:HyperLink ID="Link1" runat="server" NavigateUrl="#" Style="text-decoration: none;">
    <asp:Image runat="server" ID="Image1" ImageUrl="Images/AddToBag.gif" Style="margin: 30px 0px 11px 0;
    display: block; border: 0px;" AlternateText="AddToBag.gif" /><br style="clear: both;" />

                            <asp:Label Text="<%# Container.DataItem %>" ID="lblText" runat="server" Style="color: black;
                                padding-left: 20px;"></asp:Label>
                        </asp:HyperLink>
                    </td>
                </ItemTemplate>
                <FooterTemplate>
                    </tr> </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
        <qsf:Footer runat="server" ID="Footer1" />
        </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