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

ToolTip using two types of ShowEvent

1 Answer 38 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Raul
Top achievements
Rank 1
Raul asked on 11 Apr 2011, 01:32 PM
Hello

I am implementing the RadToolTip and I have a senary quite common in systems today. I want to register as a User is in a textbox the tootltip shows a message about that field, then assigns an onclick event ShowEvent so that when users click on the textbox the message appears, but when we navigate between fields by pressing "Tab" sailed in this field when the tooltip does not open, so it must use an event OnFocus.
But my need is to use the two behaviors OnFocus and OnClick events, how could I do this? Is it possible?

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 12 Apr 2011, 01:59 PM
Hi Raul,

 
I have a few suggestions but they depend on your exact scenario. What I can suggest is:

1) You can declare two RadToolTips for each target control and set their ShowEvent to OnClick and OnFocus. This will simulate the desired behavior.

2)You can set OnClick for ShowEvent and  hook up the onfocus event of the target control and show the RadToolTip after obtaining a reference to it in the following manner:

 function showToolTip()  
        {  
             var tooltip = $find("<%= Radtooltip1.ClientID %>");  
             tooltip.show();        
        } 

   <asp:TextBox ID="TextBox2" runat="server" onfocus="showToolTip()"></asp:TextBox> 

3) You can set ShowEvent=FromCode, hook up the desired events and programmatically show the tooltip (as in 2) but with full control over events that show the tooltip)

I hope that you will find my suggestions helpful, let me know how it goes.

Best wishes,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ToolTip
Asked by
Raul
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or