Labels color

3 posts, 1 answers
  1. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 02 Nov 2009 Link to this post

    Hi,

    this is most likely a simple question but how do you set the color of the ticks labels? The ForeColor property of the Slider or of the SliderItem won't change anything.

    Thanks
  2. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 02 Nov 2009 Link to this post

    Hi Nicolas,
    In most cases when you need to customize the look of a control of ours, you need to customize its CSS. Depending on how much of the look of the control you need to change, you can create a whole custom skin or simply add a CSS selector in the HEAD of your page that will override the one in the embedded skin.

    In this particular case, you need not create a custom skin. You can simply add the following selector to the HEAD of your page:
    <head id="Head1" runat="server">
        <title></title>
        <style type="text/css">
            .CustomTextColor .rslItemsWrapper .rslLargeTick span
            {
                color:#0f0;
            }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadSlider ID="RadSlider1" runat="server" ItemType="Tick" SmallChange="5"
            LargeChange="50" CssClass="CustomTextColor">
        </telerik:RadSlider>
        </form>
    </body>

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 02 Nov 2009 Link to this post

    I see, thank you.

    Your CSS selector would not work for me, though I figured this out which works:

    .style_TimeSliderWhiteLabels li.rslItem > span
    {
        color: #dddddd;
    }

    Thanks



Back to Top