Articles in this section
Category / Section

How to customize the appearance of the Scroll bar using WinForms ScrollerFrame?

2 mins read

Customize the appearance of scrollbar

You can use the ScrollerFrame control to customize the appearance of the Scroll bar for any control. The following code example is to customize the scroll bar’s appearance of the Gradient Panel.

C#

//Enabling the AutoScroll property.
this.gradientPanel1.AutoScroll = true;
//Attaching ScrollerFrame to GradientPanel.  
this.scrollersFrame1.AttachedTo = gradientPanel1;
//Setting Classic style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Classic;
//Setting Office2007 style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2007;
//Setting Office2007Generic style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2007Generic;
//Setting Office2010 style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2010;
//Setting WindowsXP style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.WindowsXP;
//Setting Metro style ScrollersFrame.
this.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro;

VB

'Enabling the AutoScroll property.
Me.gradientPanel1.AutoScroll = True
'Attaching ScrollerFrame to GradientPanel.  
Me.scrollersFrame1.AttachedTo = gradientPanel1
'Setting Classic style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Classic
'Setting Office2007 style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2007
'Setting Office2007Generic style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2007Generic
'Setting Office2010 style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Office2010
'Setting WindowsXP style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.WindowsXP
'Setting Metro style ScrollersFrame.
Me.scrollersFrame1.VisualStyle = Syncfusion.Windows.Forms.ScrollBarCustomDrawStyles.Metro

Screenshot

Applied visual style for ScrollersFrame

Figure 1: Visual style for ScrollersFrame

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ScrollersFrame-2098772542.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments
Please sign in to leave a comment
Access denied
Access denied