RadToolTipManager doesn't work without width & height?

7 posts, 0 answers
  1. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 23 Jul 2011 Link to this post

    Hi,
    
    I am unable to get this to work without specifying the width and height of the 
    RadToolTipManager.
    
    This doesn't work. I can see some small trace of the tooltip, but barely noticeable. 
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"                                 AutoTooltipify="true"                                Position="BottomCenter"                                Animation="Fade"                                RelativeTo="Element"                                HideEvent="LeaveTargetAndToolTip"                                ShowCallout="true"                                ContentScrolling="Auto"                                EnableShadow="true"                                Skin="Default" />                                   <div>         <asp:Label ID="lbl1" runat="server" ToolTip="This is a label" Text="My Label" />         <telerik:RadTextBox ID="txtName" runat="server" ToolTip="Please enter your full name" /> </div> This works:
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
                                   AutoTooltipify="true"
                                   Position="BottomCenter"
                                   Animation="Fade"
                                   RelativeTo="Element"
                                   HideEvent="LeaveTargetAndToolTip"
                                   ShowCallout="true"
                                   ContentScrolling="Auto"
                                   EnableShadow="true"
                                   Width="200px" Height="200px"
                                   Skin="Default" />
                                     
    	<div>
            <asp:Label ID="lbl1" runat="server" ToolTip="This is a label" Text="My Label" />
            <telerik:RadTextBox ID="txtName" runat="server" ToolTip="Please enter your full name" />
    	</div>
    This is an expected behavior?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 26 Jul 2011 Link to this post

    Hi Steven,

    This is the expected behavior, the ToolTipManager has otherwise no way of knowing how big it should be. It is a complex HTML structure and without any explicit dimensions the size falls back to the default dimensions of the HTML elements, which are usually simply the borders.

    I would also advise that you set the ShowEvent property to the desired value, as otherwise some unexpected behavior may be observed.

    Generally speaking, all the layout and behavior properties need to be set explicitly in order for it to work properly. These include Position, RelativeTo, ShowEvent, HideEvent, Width, Height, target controls/autotooltipify (used best with tooltipify zone). For the RadToolTip the IsClientID property is as important as the TargetControlID property, too.


    Best wishes,
    Marin
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 26 Jul 2011 Link to this post

    Thank you for the answer.
    But I would like to suggest for an enhancement in the next release so that the default  width & height will auto-grow to fit the entire text in it.
    Else, it kinda defeats the purpose of using the ToolTipManager to auto-tipify controls.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 27 Jul 2011 Link to this post

    Hello Steven,

    Please try setting the ContentScrolling to Default and some small initial size for the RadToolTIpManager and see if this helps it to resize according to the content in your case. I tested it with the autotooltipify functionality and it seems to resize correctly:
      <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" RelativeTo="Element"
                                 Position="BottomCenter" AutoTooltipify="true" ContentScrolling="Default" Width="150" EnableShadow="true"
                                 Height="10">
      </telerik:RadToolTipManager>
     
      <asp:CheckBox ID="CheckBox4" runat="server" ToolTip="I am checkbox" Text="Server TextBox" />
    <br />
      <asp:HyperLink ID="HyperLink2" NavigateUrl="#" runat="server" ToolTip="I am a hyperlink">HyperLink</asp:HyperLink>
    <br />
      <asp:RadioButton ID="RadioButton1" runat="server" ToolTip="I am a radio button with very very very very very very  long tooltip" Text="Server RadioButton" />
    <br />
      <asp:TextBox ID="TextBox2" runat="server" ToolTip="I am a textbox with some other very very very very very very long tooltip"></asp:TextBox>


      As for your request - I have logged it in our database, since this is the first time we receive it, and if enough requests are received this functionality will be implemented.

    Best wishes,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 27 Jul 2011 Link to this post

    Thanks, that's exactly what I am looking for!

    I looked into http://www.telerik.com/help/aspnet-ajax/tooltip-server-side-programming.html for the usage of ContentScrolling and how it does what I requested for. But I couldn't find any info on it.

    Can you point me to the right documentation for my understanding?
  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 28 Jul 2011 Link to this post

    Hello Steven,

    The idea behind this property is to control the scrollbars if the content is larger than the ToolTip size when there is a lot of content to show. The fact that this resizing can be achieved like this is not an advertised functionality, since it does not work in all cases and scenarios, only in rather simple ones and with simpler content. This is the reason why it is not in the documentation.


    All the best,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. STEVEN
    STEVEN avatar
    37 posts
    Member since:
    Oct 2010

    Posted 02 Aug 2011 Link to this post

    Thanks.
    My doubts are cleared
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017