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

showdelay and load on demand

5 Answers 102 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
egbert heuvelman
Top achievements
Rank 1
egbert heuvelman asked on 30 Jul 2008, 12:27 PM
hi,

i followed the nice example from
http://www.telerik.com/demos/aspnet/prometheus/ToolTip/Examples/RadToolTipManagerClientAPI/DefaultCS.aspx
and all works like a charm.

One little problem i have is the following: ShowDelay on the server for the radtooltipmanager is set to 3000, but it does not seem to work for the tooltip, it shows immediatly.

Is this due the reason i have the tooltip.show() at the client in the mouseover?
Or am i doing something wrong?

Thanks in advance!

5 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 31 Jul 2008, 12:20 PM
Hello Egbert,
Yes, you are correct, the delay you set using the ShowDelay property of the RadToolTipManager is not applied, because you call the show method of the tooltip explicitly. In case you want to keep the current implementation, you can use window.setTimeout to execute the show method after a specified delay.

Best wishes,
Tsvetie
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Michael Warden
Top achievements
Rank 1
answered on 25 Jan 2010, 08:57 PM
i'm trying to use the setTimeout approach on the .Show() method, as below.  The delay is occuring and then the tooltip loads, but as soon as it finishes loading the attach error is thrown.

function

 

showToolTipCT(element, ftext) {

 

 

var tooltipManager = $find("<%=RadToolTipManager1.ClientID%>");

 

 

if (!tooltipManager) return;

 

 

var tooltip = tooltipManager.getToolTipByElement(element);

 

 

if (!tooltip) {

 

tooltip = tooltipManager.createToolTip(element);

 

var FinalText = ftext.replace("&apos;", "'")

 

tooltip.set_manualClose(

true);

 

tooltip.set_text(FinalText);

tooltip.set_width(400);

tooltip.set_height(400);

}

 

window.setTimeout(

"tooltip.show()",2000);

 

}

0
Svetlina Anati
Telerik team
answered on 26 Jan 2010, 01:12 PM
Hello Michael Warden,

The problem comes from the incorrect call to the setTimeout function - please, modify the code in the following manner and test again:

window.setTimeout(
function(){
  
tooltip.show();}
  
,2000); 


The problem comes from the fact that you should pass a function as an argument - this means either to define an anonymous one as shown above or declare another one and pass its name.


Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
jc mag
Top achievements
Rank 1
answered on 13 Apr 2010, 05:27 PM
There is a problem with the setTimeout method. If you hover the element, then move your mouse away, the tooltip will still appear after the seconds set in setTimeout...
any workarount?
0
Svetlina Anati
Telerik team
answered on 16 Apr 2010, 10:16 AM
Hi jc mag,

Since you show the tooltip from code and by using its method show(), you should also programmatically decide when it should hide or not show. If you simply need to show it on mouse over and hide it on mouse out you can use the built-in functionality - more about available hide events is available below:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/hideevent/defaultcs.aspx

In the case of showing/hiding the tooltip programmatically from your code you should determine what is the behavior. To prevent the showing of the tooltip in some condition after its show was triggered and before it is displayed, you should handle teh OnClientBeforeShow event and use the args.set_cancel(true) syntax to cancel the show after you check the condition.

Regards,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolTip
Asked by
egbert heuvelman
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Michael Warden
Top achievements
Rank 1
Svetlina Anati
Telerik team
jc mag
Top achievements
Rank 1
Share this question
or