)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: ScrollersFrame |
Published Date: February 24, 2015 |
Last Revised Date: January 10, 2020

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: http://www.syncfusion.com/downloads/support/directtrac/general/ScrollersFrame-2098772542.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Josep Llobet Gonzalez
May 09, 2018

Hello,

I'm using scrollerframe, but I have a design problem. When I load the listView that is AttachedTo I see it first White and later the color i have chosen. I made a gif to make it easier understand it.


What shall I do to don't let this happend?

Thanks in advance.




Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon