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

Displaying Multiple Tooltips at one time

4 Answers 329 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 12 May 2008, 09:44 AM
Hi,

I'm currently implementing an outlook style notifiction popup system using the radTooltip. The current problem I'm trying to solve is what to do when notifications happen in quick succession. The simplest way to deal with this, I think, is if a tooltip is already displayed, put the new notification in another tooltip and position this directly above the already displayed one. It is possible for radToolTip to display more than one tooltip simultaneously  but to implement the functionality I require, I need to create the tooltips programmatically, client side. I can't see any mention of this in the documentation, so can you tell me if its possible?

Many Thanks,

John Rhodes.

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 13 May 2008, 11:02 AM
Hi John,

Only a single tooltip can be visible at any given time. This behavior is by design and will not be changed as changing it would defy the purpose of the control.

The purpose of a tooltip is to provide additional information for a given element. It is not meant to be used as a popup control or as a draggable panel. For this purpose we provide RadWindow and RadDock controls. Both of these controls allow more than one visible element of the kind on the page.

Our suggestion is to consider using RadWindow and RadDock controls.


Greetings,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John
Top achievements
Rank 1
answered on 13 May 2008, 11:54 AM
Hi Svetlina,

Thanks for your reply. I think that a radWindow is just overkill for what I want to achieve. The tooltip is perfect. Given that the tooltip allows for the ability to provide outlook style notifications, it should also allow the programmer to deal with the situation when notifications arrive in quick succession. It is possible to display two tooltips at once ( I created two tooltips through markup and it worked fine), but I need to create them programmatically. My thread subject line was a bit misleading as what I actually wanted to know was if its possible to  create a new tooltip through javascript.

Thanks,

John.
0
Svetlina Anati
Telerik team
answered on 14 May 2008, 08:06 AM
Hi John,

It is not very easy to do so with the current RadToolTip implementation, but due to cutomers' request we made some extensions to the RadToolTipManager client-API to make such a task easier. The Q1 SP1 will be released by the end of this week, and will feature the changes.

Here is a code sample that we prepared for you. It will not work now, but it will work when we release the SP1 and you should be able to implement your scenario in a fairly straightforward manner:

  function showToolTip(element, message)  
                {  
                   var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>");  
                     
                   //Find the tooltip for this element if it has been created   
                   var tooltip = tooltipManager.getToolTipByElement(element);  
                     
                   //Create a tooltip if no tooltip exists for such element  
                   if (!tooltip)  
                   {                          
                        tooltip = tooltipManager.createToolTip(element);  
                   }  
                                                                                                 
                   //Show the tooltip with the message [if any message is provided]  
                   if (message) tooltip.set_text(message);  
                   tooltip.show();                                                          
                }  
                 


Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Accepted
John
Top achievements
Rank 1
answered on 16 May 2008, 09:43 PM
Thanks Svetlina, I will give it a try
Tags
ToolTip
Asked by
John
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
John
Top achievements
Rank 1
Share this question
or