Tool Tip after update show for 5 seconds

2 posts, 0 answers
  1. Joshua
    Joshua avatar
    19 posts
    Member since:
    Apr 2008

    Posted 22 Apr 2008 Link to this post

    I have a senerio where the user requests that after an item is updated, to show a message for like 5 seconds and then disapear.  I noticed on the samples there is one tool tip showing number of items in a mailbox but how can i make this work by after updating an item per say, change a message inside the tooltip and then display it lets say in the lower left hand corner.  Any samples would be greatly apreciated or a guidance to how i can complete this task.

    Thanks in advance.
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 25 Apr 2008 Link to this post

    Hello Joshua,
    You can use the following approach:


    <body> 
        <form id="form1" runat="server">  
            <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
            <asp:Button ID="Button1" runat="server" Text="Item 1" OnClick="Button1_Click" /> 
            <asp:Button ID="Button2" runat="server" Text="Item 2" OnClick="Button2_Click" /> 
            <asp:Button ID="Button3" runat="server" Text="Item 3" OnClick="Button3_Click" /> 
            <asp:Button ID="Button4" runat="server" Text="Item 4" OnClick="Button4_Click" /> 
            <asp:Button ID="Button5" runat="server" Text="Item 5" OnClick="Button5_Click" /> 
              
            <telerik:RadToolTip ID="RadToolTip1" runat="server" ShowEvent="FromCode" 
                ShowCallout="false" Position="BottomLeft" RelativeTo="BrowserWindow" 
                OffsetX="0" OffsetY="0" AutoCloseDelay="5000">  
            </telerik:RadToolTip> 
        </form>      
    </body> 

    code-behind:
    protected void Page_Load(object sender, EventArgs e)  
        {  
            this.RadToolTip1.VisibleOnPageLoad = false;  
        }  
     
        protected void Button1_Click(object sender, EventArgs e)  
        {  
            ShowToolTip(((Button)sender).Text);  
        }  
     
        protected void Button2_Click(object sender, EventArgs e)  
        {  
            ShowToolTip(((Button)sender).Text);  
        }  
     
        protected void Button3_Click(object sender, EventArgs e)  
        {  
            ShowToolTip(((Button)sender).Text);  
        }  
     
        protected void Button4_Click(object sender, EventArgs e)  
        {  
            ShowToolTip(((Button)sender).Text);  
        }  
     
        protected void Button5_Click(object sender, EventArgs e)  
        {  
            ShowToolTip(((Button)sender).Text);  
        }  
     
        public void ShowToolTip(string text)  
        {  
            this.RadToolTip1.Text = text;  
            this.RadToolTip1.VisibleOnPageLoad = true;  
        } 

    All the best,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top