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

Setting a text value on the drag handle in the slider

1 Answer 133 Views
Slider
This is a migrated thread and some comments may be shown as answers.
CodeMonster
Top achievements
Rank 1
CodeMonster asked on 13 Aug 2012, 09:11 AM

Can you tell me if (and how) it is possible to set a value within the drag handle on the slider. The demos and examples I have seen show the drag handle being very thin and give the ability to add a tooltip, but no text within the drag button itself.

thanks

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Aug 2012, 01:55 PM
Hello,

Text cannot be added to the drag handle because it is designed to be small enough to avoid obscuring the interface. You can override these values with some CSS and show text there (the text can be added via JavaScript), yet I would advise against doings this as it may break the control's functionality.

Nevertheless, here follow the snippets:
.rslDraghandle
{
    text-indent: 0px !important;
    font-size: 12px !important;
    overflow: visible !important;
}
and
function pageLoad()
{
    var dragHandle = $find("<%=slider1.ClientID %>").get_dragHandles()[0];
    dragHandle.firstChild.innerHTML = "Drag";
}
where slider1 is the server ID of the slider that you want to modify.

You can make the CSS selectors heavier by adding our own classes so that they do not affect all sliders on the page and you can change the font size, color and content as you see fit.


Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Slider
Asked by
CodeMonster
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or