Displaying image inside of tooltip with scrollbars

7 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 24 May 2011 Link to this post

    I have a tooltip manager with declaration:

    <telerik:RadToolTipManager ID="rttmFLC" 
                    OffsetX="1" 
                    Width="400" 
                    Height="400" 
                    HideEvent="LeaveToolTip"
                    runat="server" 
                    OnAjaxUpdate="OnAjaxUpdate"
                    RelativeTo="Element"
                    Position="MiddleRight"
                    ContentScrolling="Auto"
    >       
    </telerik:RadToolTipManager>


    In code behind I load the tooltip content. The content is comprised of an image. I have found that, if the image is taller than the tootip height, a vertical scroll bar appears. However, if the image is wider than the tooltip width, a horizontal scroll bar does not appear. I have tried this by loading a simple html <img> tag in the tootip

    ContentTemplateContainer.Controls collection, as well as adding a user control with an image in it. Both ways, no horizontal scrollbar. I have also tried to set the ToolTipManager ContentScrolling to "Both" instead of "Auto". Again no, horizontal scrollbar. For the time being, I can set the image width to 100%, so that the entire image width is seen in the tooltip. However, this will obviously make it so the image doesn't appear as it actually is, but rather as a "thumbnail" of sorts. Any idea why I can't get the horizontal scrollbar to show up?

  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    Hi Albert,

    I just tried the following and it worked fine for me. Is there any other part of your setup that might differ?

    <telerik:RadButton ID="RadButton1" runat="server" Text="Target">
    </telerik:RadButton>
    <telerik:RadToolTip runat="server" TargetControlID="RadButton1" HideEvent="LeaveToolTip"
        Width="400" Height="400" ContentScrolling="Auto" OffsetX="1" Position="MiddleRight">
        <img src="Koala.jpg" />
    </telerik:RadToolTip>

    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 24 May 2011 Link to this post

    set the image height/width to 500px and let me know if the horizontal scrollbars appear for you.
  5. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    Hi Albert,

    I still had scroll bars. I attached a screen shot. What version of the controls are you using?

    -Gimmik
  6. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 24 May 2011 Link to this post

    I am using Q1 2011 SP1. Just to make sure we are doing the same thing... you are using a TooltipManager and setting the tooltip content server-side in the OnAjaxUpdate event, correct?
  7. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    Albert,

    I was just using an image tag inside of the RadToolTip. Can you post a runnable solution so I can see exactly what you see?

    -Gimmik
  8. Albert Shenker
    Albert Shenker avatar
    550 posts
    Member since:
    Mar 2004

    Posted 24 May 2011 Link to this post

    it seems to work in a stripped down project. I will try to isolate the case and wil post when I find something.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017