[CLOSED] Tooltip not being set in the Codebehind...

  1. #1

    [CLOSED] Tooltip not being set in the Codebehind...

    I'm trying to Add a tooltip in the codebehind, but its not being set.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">     
    
        protected void UpdateToolTip(object sender, DirectEventArgs e)
        {
            var t = new ToolTip()
            {
                ID = "Tooltip1",
                Target = Button2.ClientID,
                Title = @"Comments Added:",
                Html = "It works...",
            };
            Controls.Add(t);
            t.Render();
        }
    
    </script>
    <!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 id="Head1" runat="server">
        <title>Simple Form Panel - Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button ID="Button2" ArrowAlign="Right" Icon="Accept" Text="Update" OnDirectClick="UpdateToolTip"
            runat="server" />
    </body>
    </html>
    Last edited by Daniil; Jul 13, 2012 at 6:58 PM. Reason: [CLOSED]
  2. #2
    1. Please use ConfigID instead ClientID
    Target = Button2.ConfigID,
    2. For button you can use its ToolTip string property
    Button2.ToolTip = @"Comments Added:";
  3. #3
    It works if I use 'Html' tag, but NOT Tooltip, it display blank, screen shot attached.

    Click image for larger version. 

Name:	tooltip doesn't work.JPG 
Views:	128 
Size:	6.2 KB 
ID:	4482

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">     
    
        protected void UpdateToolTip(object sender, DirectEventArgs e)
        {
            var t = new ToolTip()
            {
                ID = "Tooltip1",
                Target = Button2.ConfigID,
                ToolTip = @"It works...",
            };
            Controls.Add(t);
            t.Render();
        }
    
    </script>
    <!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 id="Head1" runat="server">
        <title>Simple Form Panel - Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button ID="Button2" ArrowAlign="Right" Icon="Accept" Text="Update" OnDirectClick="UpdateToolTip"
            runat="server" />
    </body>
    </html>
    Quote Originally Posted by Vladimir View Post
    1. Please use ConfigID instead ClientID
    Target = Button2.ConfigID,
    2. For button you can use its ToolTip string property
    Button2.ToolTip = @"Comments Added:";
    Last edited by Fahd; Jul 13, 2012 at 6:57 PM. Reason: Updated because it did not work for the Tooltip Property...
  4. #4
    Vladimir has suggested to use the ToolTip property of the Button, not of the ToolTip itself. You should not use the ToolTip property of the ToolTip control.

    Quote Originally Posted by Vladimir View Post
    2. For button you can use its ToolTip string property
    Button2.ToolTip = @"Comments Added:";
  5. #5
    Opps, my fault... sorry. Thanks for the correction.

    Quote Originally Posted by Daniil View Post
    Vladimir has suggested to use the ToolTip property of the Button, not of the ToolTip itself. You should not use the ToolTip property of the ToolTip control.

Similar Threads

  1. [CLOSED] Gridpanel Tooltip
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 21, 2012, 1:19 PM
  2. [CLOSED] Calendar Tooltip
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 27, 2011, 8:54 AM
  3. [CLOSED] Calendar Tooltip
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 14, 2011, 6:30 PM
  4. [CLOSED] tooltip artifacts in IE 8
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 19, 2011, 2:09 PM
  5. [CLOSED] ComboBox Tooltip
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 20, 2010, 2:31 PM

Tags for this Thread

Posting Permissions