Geoff Van Brunt
Top achievements
Rank 1
Geoff Van Brunt
asked on 20 Jul 2007, 07:54 PM
When I a tooltip is first shown on my page, it is appearing in the wrong spot.(to the left of where it should) However after moving off of the element and back on, it then works correctly. I'm positioning to middleleft of elements. It appears to happen if the text needs to be written on "more than one line" as it would run off the page to the right. Anyone else seeing this behavior?
I'm using a pre-service pack build (706) right now so perhaps this is a new error?
I'm using a pre-service pack build (706) right now so perhaps this is a new error?
8 Answers, 1 is accepted
0
Hello Geoff,
We were not able to reproduce the issue.
Can you send us a simple project that demonstrates the issue, or, in case you are able to reproduce the same behavior on any of our online demos - let us know about the sequence of steps.
Looking forward to hearing from you,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
We were not able to reproduce the issue.
Can you send us a simple project that demonstrates the issue, or, in case you are able to reproduce the same behavior on any of our online demos - let us know about the sequence of steps.
Looking forward to hearing from you,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Tom Underhill
Top achievements
Rank 1
answered on 24 Jul 2007, 03:29 PM
I have the same issue. I am using a very simple implementation of ToolTip to show when a user hovers over a question mark image. First hover the ToolTip shows in the bottom left of the screen. Second hover it shows nearer the image but the ToolTip arrow is wrong. Third attempt all is well. Very frustrating!
Incidently the Tooltip does reside within a TabStrip PageView and is also in a Masterpage enabled site.
Regards,
Incidently the Tooltip does reside within a TabStrip PageView and is also in a Masterpage enabled site.
Regards,
0
Hi Tom Underhill,
I was able to reproduce the problem, that Geoff Van Brunt described and forwarded it to our developers. One possible workaround for this case is to set the Width of the RadToolTip. In case this does not solve your problem, could you please prepare and send us a simple running project, that demonstrates it?
Best wishes,
Tsvetie
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I was able to reproduce the problem, that Geoff Van Brunt described and forwarded it to our developers. One possible workaround for this case is to set the Width of the RadToolTip. In case this does not solve your problem, could you please prepare and send us a simple running project, that demonstrates it?
Best wishes,
Tsvetie
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
I am posting the answer to a separate support ticket regarding this issue in this forum thread as well
---------------------------------------------------------------------------------------------------------------------------------------------------------
Hello Geoff,
It is a very tricky issue to deal with (not from coding point of view, but from a logical point of view). Here is what happens:
1. The tooltip does not have a fixed width by default. So, providing long text without setting a specific width is bound to create a long tooltip - in your case longer than the screen.
2. However - tooltips must stay in the screen. Thus, when the tooltip is shown, its wdith is automatically corrected to fit the screen, and its display position is adjusted to make sure it does not go out of the screen either.
Thus, the behaior you notice occurs.
The issue by itself is bigger than the simply making sure the tooltip uses the space to the right - from the target control to the right of the page. The tooltip can be positioned above, below, diagonally etc relative to the target control - and keeping it both in sight, and properly positioned requires a more general solution.
For the time being, we suggest the following hack which is general enough and does not require you to set explicit heights:
Essentially, the code causes a tooltip that is shown to be hidden and re-shown again - thus causing it to resize properly.
Greetings,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
---------------------------------------------------------------------------------------------------------------------------------------------------------
Hello Geoff,
It is a very tricky issue to deal with (not from coding point of view, but from a logical point of view). Here is what happens:
1. The tooltip does not have a fixed width by default. So, providing long text without setting a specific width is bound to create a long tooltip - in your case longer than the screen.
2. However - tooltips must stay in the screen. Thus, when the tooltip is shown, its wdith is automatically corrected to fit the screen, and its display position is adjusted to make sure it does not go out of the screen either.
Thus, the behaior you notice occurs.
The issue by itself is bigger than the simply making sure the tooltip uses the space to the right - from the target control to the right of the page. The tooltip can be positioned above, below, diagonally etc relative to the target control - and keeping it both in sight, and properly positioned requires a more general solution.
For the time being, we suggest the following hack which is general enough and does not require you to set explicit heights:
<script> |
var toggleShow = false; |
function OnClientShow(sender) |
{ |
toggleShow = !toggleShow; |
if (toggleShow) |
{ |
sender.hide(); |
sender.show(); |
} |
} |
</script> |
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
|
<telerik:RadToolTip ID="RadToolTip1" runat="server" IsClientID="True" Position="MiddleRight" |
RelativeTo="Element" |
OnClientShow="OnClientShow" |
Skin="Web20Orange" TargetControlID="TextBox1" |
Text="This is some text that is really long and should run off the page and onto another line. If it does not, shrink the window and then refresh the page. At first it will show over the text box, then it will show in the correct location after the seconc mouseover."> |
</telerik:RadToolTip> |
Essentially, the code causes a tooltip that is shown to be hidden and re-shown again - thus causing it to resize properly.
Greetings,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
MB
Top achievements
Rank 1
answered on 18 Oct 2007, 11:42 PM
I tried that, but ran into a problem as I had OnAjaxUpdate defined... and doing a hide() and show() causes the Ajax request to fire again.
If you want have some fun... place an AjaxManager.ResponseScripts.Add("myScriptfunction()") in the OnAjaxUpdate event handler, and then do a hide() and show() in that client function.
...infinte loop created.
If you want have some fun... place an AjaxManager.ResponseScripts.Add("myScriptfunction()") in the OnAjaxUpdate event handler, and then do a hide() and show() in that client function.
...infinte loop created.
0
Hi MB,
In this case we would recommend to use the following approach:
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In this case we would recommend to use the following approach:
<script> |
var toggleShow = false; |
function OnClientShow(sender) |
{ |
toggleShow = !toggleShow; |
if (toggleShow) |
{ |
sender.hide(); |
//instead of show(), call _show because it doesn't throw the show event and |
//it does not call AjaxUpdate |
sender._show(); |
} |
} |
</script> |
|
<br /> |
<br /> |
<br /> |
<br /> |
<br /> |
<br /> |
<br /> |
<br /> |
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
<telerik:RadToolTipManager |
ID="RadToolTipManager1" |
runat="server" |
OnClientShow="OnClientShow" |
Position="MiddleRight" |
RelativeTo="Element" |
Skin="Web20Orange" |
OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"> |
<TargetControls> |
<telerik:ToolTipTargetControl TargetControlID="TextBox1" /> |
</TargetControls> |
</telerik:RadToolTipManager> |
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Bill
Top achievements
Rank 1
answered on 01 Mar 2008, 01:13 AM
Just came upon this thread when I encountered this problem using the Q3 2007 release and was wondering... Will this problem be fixed in the next release or final version of Prometheus? The hack is kind of ugly.
0
Hi Bill,
Yes, this issue has been logged for fixing, and we will do our best to build a workaround into the RadToolTip code itself, as this problem is generating unneeded support. Yet, as pointed out in the thread, when no width is specified and the tooltip text is long - several factors come into play, and the result is not strictly a bug that can be fixed by changing a line or two of code.
Sincerely yours,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Yes, this issue has been logged for fixing, and we will do our best to build a workaround into the RadToolTip code itself, as this problem is generating unneeded support. Yet, as pointed out in the thread, when no width is specified and the tooltip text is long - several factors come into play, and the result is not strictly a bug that can be fixed by changing a line or two of code.
Sincerely yours,
Tervel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center