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

SelectedRegion Color

1 Answer 116 Views
Slider
This is a migrated thread and some comments may be shown as answers.
dennis
Top achievements
Rank 1
dennis asked on 29 Apr 2009, 06:55 PM
How i can change the selectedregion color from CodeBehind, ForeColor property doesnt work, any help????

im doin it now with javascript :
     $get('RadSliderSelected_' + $find('RadSlider1').get_id()).style.background = 'url("../Images/Red.gif")';

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 01 May 2009, 12:17 PM
Hello Dennis,
The RadSlider control is a complex control, not a simple HTML element and the HTML it renders is consisted of a lot of HTML elements. That is why, in my opinion, it is not clear to which element of the RadSlider HTML the ForeColor property should be applied. That is why, it is ignored.

In case you what to customized the look of the RadSlider, you can do one of the following:
  1. Create a custom skin. You can set the Skin property of the RadSlider in the code behind. For additional information on custom skins, please refer to our online documentation.
  2. Use the CssClass property of the RadSlider to apply changes to the look of the RadSlider in case you do not intend to create whole custom skin, but only what to change the image for the selected region element. For example:
    .BlueSliderTrack .rslSelectedregion 
        backgroundblue url('BlueSliderTrack.GIF'!important
    <telerik:RadSlider ID="RadSlider1" runat="server" Value="50"  
        CssClass="BlueSliderTrack"
    </telerik:RadSlider> 

I have attached a simple test page that demonstrates the second approach - how you can switch the color of the selected region from blue to red dynamically by using the CssClass property of the RadSlider.

Sincerely yours,
Tsvetie
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
Slider
Asked by
dennis
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or