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

tooltip for checkbox text

5 Answers 235 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
John Davis
Top achievements
Rank 2
John Davis asked on 16 Feb 2009, 02:23 PM
Is there any simple way to set up a tooltip that will display upon mouseover on the text of a checkbox?  If you associate radtooltip with a checkbox the normal way, the tooltip appears only when the mouse is over the checkbox, but the tooltip does not appear when the mouse is over the text of the checkbox.

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 18 Feb 2009, 10:55 AM
Hello John,

The checkbox control is rendered as an input element with the specified ID and a label without any ID which contains the text - that is why when you set the RadToolTip's target control to be the ID of the checkbox, it is actually associated only to the input and not to the label.

I suggest to wrap the checkbox in a DIV element which has display:inline and to associate the RadToolTip TargetControlID to it as shown below:

 <div id="testDiv" style="display: inline">  
            <asp:CheckBox ID="checkBox1" runat="server" Text="This is a test text" /></div>  
        <telerik:RadToolTip ID="tooltip1" runat="server" RelativeTo="Element" TargetControlID="testDiv" 
            Text="This is a tooltip" IsClientID="true">  
        </telerik:RadToolTip> 



Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jen
Top achievements
Rank 1
answered on 12 May 2009, 09:11 AM
I have the same problem too only I'm using a checkboxlist with multiple listitems. Because of this, I can't place the individual items in div-tags. Is there a way around this problem?
0
Svetlina Anati
Telerik team
answered on 15 May 2009, 09:06 AM
Hi Jennifer,

What I can suggest is to use one of the approaches shown below:

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

I also a attached a sample demo which dynamically creates a CheckBox list and associates RadToolTip to each item. In case you have declared it in the markup, instead of creating it dynamically, all you should do is just to iterate through its items.

In case you need further assistance, please prepare a sample demo page, open a new support ticket and send it to me along with detailed description of the problem and the desired behavior and the preferred approach and I will do my best to help.

Regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jen
Top achievements
Rank 1
answered on 15 May 2009, 09:18 AM
Hello Svetlina,

Thank you for your reply and for the different approaches. Just now I found another approach for the problem: If I fill in the clientID of the Checklist in the property ToolTipZoneID, it also works.
0
Svetlina Anati
Telerik team
answered on 15 May 2009, 11:43 AM
Hello Jennifer,

Yes, this approach will also work and choosing what exact approach to use depends on your exact preferences and requirements. That is why we have prepared various demos in order to help our clients determine which exact approach suits best their need.In case you need further assistance, do not hesitate to contact us again.

All the best,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ToolTip
Asked by
John Davis
Top achievements
Rank 2
Answers by
Svetlina Anati
Telerik team
Jen
Top achievements
Rank 1
Share this question
or