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

Coloring scrollbar

1 Answer 28 Views
ScrollablePanel
This is a migrated thread and some comments may be shown as answers.
Cuong
Top achievements
Rank 1
Cuong asked on 04 Jun 2014, 10:15 PM
Hi,

I have a RadScrollablePanel and I'm trying to figure out how to color the vertical scrollbar through code and not by setting a theme.  Can you tell me how to do that?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Jun 2014, 10:48 AM
Hello Cuong,

Thank you for writing.

You can customize the VerticalScrollbar via code as follows:
((FillPrimitive)radScrollablePanel1.VerticalScrollbar.ScrollBarElement.Children[1]).BackColor = Color.Red;
  
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbFill.BackColor = Color.Yellow;
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.ThumbElement.ThumbFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
  
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonFill.BackColor = Color.Green;
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.FirstButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
  
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonFill.BackColor = Color.Blue;
radScrollablePanel1.VerticalScrollbar.ScrollBarElement.SecondButton.ButtonFill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ScrollablePanel
Asked by
Cuong
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or