Click here to Skip to main content
15,882,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to change the Backcolor and style of the datagridview scrollbars control of windows form with below line
this.dataGridView_Constants.Controls[1].BackColor = Color.Red

It's not working.
Is there any solution available for it ,Either it can be doing straight code changes or achieved by paint/custom controls.

Please let me know if you have any solution for it.

Thanks

What I have tried:

I tried below line
this.dataGridView_Constants.Controls[1].BackColor = Color.Red
Posted
Updated 8-Mar-23 17:28pm
Comments
PIEBALDconsult 7-Mar-23 13:32pm    
Is that what your users want?
Member 9832225 9-Mar-23 0:00am    
yes,Need to apply colors to the scrollbars.

As far as I know, you can't change the system provided scrollbars for your application - and for good reason. Users "know" what scrollbars look like, and how to use them so significant changes could make apps harder to user.

This may help: How to skin scrollbars for Panels, in C#[^] - but be aware it is an old article, so it's very possible that it won't work properly in more recent OSes.

I'd ask myself why I want to change "standard UI components" at all ...
 
Share this answer
 
As part of applying the new themes for windows controls,
I need to apply new colors to the scrollbars vertical scrollbar and horizontal scrollbars

Is there anyway ??
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900