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

Tooltip Scrollbars

3 Answers 127 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 16 Mar 2011, 09:07 AM
I have a OnClientBeforeShow function that manually sets the Width and the Height depending on the size of the browser window. I have ContentScrolling set to Auto. The scrollbars show up everytime in IE8. However, in IE7 the bars indiscriminately disappear. I reset the settings and restarted the browser. The scrollbars showed up on the first hover-over, then thereafter do not show up. One can still scroll with the mouse wheel, however, no scrollbars. Is this the control or the browser?

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 18 Mar 2011, 04:31 PM
Hi Ryan,

I tried to reproduce the reported behavior but to no avail.  Please note that you should use the set_width() and set_height() methods and not try to set the Width and Height properties of the tooltip.

Upon researching the issue in the Internet I saw similar complaints about IE7's scrollbar behavior, usually with dynamic content inside a div wrapper. The reported (yet not guaranteed) fix was setting the overflow property to scroll, which can be set by setting the ContentScrolling property to Both. Note that this will cause the scrollbars to be always visible, even if not needed.

Here is a short code that appears to work as expected on my end. Inside you can see the correct method to set the ContentScrolling property via JavaScript.
    <asp:ScriptManager runat="server" />
    <telerik:RadToolTip runat="server" ID="tooltip1" TargetControlID="myDiv" OnClientBeforeShow="defineTooltip"
    HideEvent="LeaveTargetAndToolTip" IsClientID="true" RelativeTo="Mouse">
    </telerik:RadToolTip>
<div id="myDiv" style="width: 100px; height:100px; background: grey;">some content that calls the tooltip</div>
</div>
 
<script type="text/javascript">
    function defineTooltip(sender) {
        sender.set_width(100);
        sender.set_height(40);
        sender.set_contentScrolling(Telerik.Web.UI.ToolTipScrolling.Auto);
        sender.set_text("some very very very very very very very very long content");
    }
</script>

Best regards,
Marin
the Telerik team
0
Ryan
Top achievements
Rank 1
answered on 18 Mar 2011, 04:43 PM
I actually do exactly what you are doing there. I think an important note that may shed a little light, is that I have a Link button in the content of the tooltip that when clicked opens a Modal Rad Window. Strangely the scrollbars mysteriously render on the tooltip. They remain even after closing the radwindow, but if I close and reopen the Tooltip, the same scenario happens. Reminder: this has no issues in IE8 on my development computer, only seems to happen in production which unfortunately uses IE7. 
0
Marin Bratanov
Telerik team
answered on 21 Mar 2011, 05:04 PM
Hello Ryan,

I tried adding a link button and a RadWindow to the configuration, but it still works fine on my end. I have attached my page and a video showing my experiment: http://screencast.com/t/pZ44Nfk4Lu1L.
Please send us a working project that displays the described behavior so we can investigate further and provide e solution.

Best wishes,
Marin
the Telerik team
Tags
ToolTip
Asked by
Ryan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or