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

ToolTipManager will not display for checkboxes on Focus

3 Answers 114 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Conan Galloway
Top achievements
Rank 1
Conan Galloway asked on 11 Jul 2008, 10:05 PM

A have a user input form with tool tips for all controls, my preferred ShowEvent mode for the ToolTipManager is "Focus", checkboxes do not seem to like this however.

If I leave the ShowEvent as default or MouseOver, my checkbox ToolTip will display ok but if I change to Focus it doesn't work.  I have tried:

  •  Automatically and manually assigning the checkbox control to the ToolTipManager.
  • Assigning an individual RadToolTip just to the checkbox control.
  • Setting the checkbox with and without a Text property.

After some searching I haven't found any reference to this in the documentation, is there a solution (simple or otherwise) that I am overlooking?

Regards
Conan

3 Answers, 1 is accepted

Sort by
0
Kevin Babcock
Top achievements
Rank 1
answered on 12 Jul 2008, 05:25 AM
Hello Conan,

What version of the RadControls for ASP.NET AJAX are you using? I just tried to duplicate your problem with Q1 2008 SP1 and was unable to. I tried all the scenarios you mentioned but the RadToolTip was working fine when set to show on the OnFocus event.

Here is an example of the code I produced.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
     
        <asp:TextBox ID="TextBox1" runat="server" /> 
        <asp:CheckBox ID="CheckBox1" runat="server" />               
             
        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" 
            Text="Hello, RadToolTip!" 
            ShowEvent="OnFocus"
            <TargetControls> 
                <telerik:ToolTipTargetControl TargetControlID="CheckBox1" /> 
                <telerik:ToolTipTargetControl TargetControlID="TextBox1" /> 
            </TargetControls> 
        </telerik:RadToolTipManager>                 
    </form> 
</body> 
</html> 
 

I hope this was helpful. Please let me know if you continue to have trouble.

Regards,
Kevin Babcock
0
Conan Galloway
Top achievements
Rank 1
answered on 13 Jul 2008, 08:55 PM
Hello

I am using Q1 2008 SP1 as well.  I tried your example and it works, but only if they are using the Text parameter within the ToolTip manager (ie if all the controls have the same tool tip.  If you use the ToolTip parameter within the control the checkbox does not render the tip.

That said this does give me an immediate solution which is to use a separate Manager just for the checkbox in question (see below).  Correct me if I'm wrong but I don't believe that there is a problem using more than ToolTipManager is there?  This really isn't an ideal solution especially if one has multiple checkboxes.  Please let me know if you are aware of another solution.

Ironically I find that checkboxes are the controls that typically benefit most from tooltips given their sometimes cryptic nature.

Regards
Conan

<ul>
    <li><asp:TextBox ID="TextBox1" runat="server" ToolTip="test TextBox1" /></li>
    <li><asp:CheckBox ID="CheckBox1" runat="server" /></li>
    <li><asp:TextBox ID="TextBox2" runat="server" ToolTip="test TextBox2"/></li>
</ul>
   
    <telerik:RadToolTipManager ID="RadToolTipManager2" runat="server"         
        ShowEvent="OnFocus" RelativeTo="Element" Text="Test CheckBox1" Position="MiddleRight">
        <TargetControls>            
            <telerik:ToolTipTargetControl TargetControlID="CheckBox1" />            
        </TargetControls>
    </telerik:RadToolTipManager>   
                
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"         
        ShowEvent="OnFocus" RelativeTo="Element" Position="MiddleRight">
        <TargetControls>            
            <telerik:ToolTipTargetControl TargetControlID="TextBox1" />
            <telerik:ToolTipTargetControl TargetControlID="TextBox2" />
        </TargetControls>
    </telerik:RadToolTipManager> 

0
Svetlina Anati
Telerik team
answered on 14 Jul 2008, 01:04 PM
Hi Conan,

The CheckBox server control is rendered on the client in the following manner:

<span title="test CheckBox3">  
<input id="CheckBox3" type="checkbox" name="CheckBox3" /> 
</span> 

As you can see, the ToolTip (Title) property is assigned to a span element which does not have an ID. That is why you cannot tooltipify the checkbox in this manner.

What I can suggest in your case is to use a RadToolTipManager and iterate through the checkboxes on your page. Another option is to use separate RadToolTip controls, one for each checkbox.


All the best,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Conan Galloway
Top achievements
Rank 1
Answers by
Kevin Babcock
Top achievements
Rank 1
Conan Galloway
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or