This is a migrated thread and some comments may be shown as answers.

Displaying image inside of tooltip with scrollbars

6 Answers 127 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 24 May 2011, 04:00 PM
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?

6 Answers, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 24 May 2011, 08:01 PM
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
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 24 May 2011, 08:04 PM
set the image height/width to 500px and let me know if the horizontal scrollbars appear for you.
0
Gimmik
Top achievements
Rank 1
answered on 24 May 2011, 11:14 PM
Hi Albert,

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

-Gimmik
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 24 May 2011, 11:26 PM
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?
0
Gimmik
Top achievements
Rank 1
answered on 24 May 2011, 11:33 PM
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
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 25 May 2011, 01:45 AM
it seems to work in a stripped down project. I will try to isolate the case and wil post when I find something.
Tags
ToolTip
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Gimmik
Top achievements
Rank 1
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Share this question
or