I'm sorry, I failed to mention it's a windows application. This didn't work :(
Main Topics
Browse All TopicsI have a fairly colorful application, but when my datagrid displays the scrollbar and it's gray, it becomes ugly. Is there a way to add color or something to it????
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
edfrazier,
It'd be reallllly difficult to change the color for the scrollbars. After quite a bit of research, here's what I've found out. I don't know if what I'd be saying are even half truth, but I'm about to give up on the search.
Scrollbar's color aren't meant to change from the window's theme setting. You could attach the scrollbar's color to the systemcolors.scrollbar, and on systemcolor change, fire the event to change the scrollbar's color. But that requires overriding the scrollbar event class.
In order to even access the datagrid's scrollbar to tinker with them, you'd have to inherit the datagrid and pull out the scrollbar objects. But as far as I know, you cannot override the scrollbar setting within the datagrid override and then attach it -- since the signature becomes different.
For example... let's say you are successful in creating a customized scrollbar inherited from scrollbar class. Since its a child object with differenet signature, it'd throw you an error if you try to replace the datagrid's scroll bar with the new customized scrollbar.
So to do what you are asking, you would have to rebuilt the class DataGrid that utilizes your customized scrollbars. Since its a readonly property, I'm not so sure how you would be able to do that. You might have to disable the existing scrollbar property within the DataGrid and add in your own customized scrollbar and reconfigure the event handling like scrolling, clicking, resizing, etc...
Or, you could override the OnPaint/Paint function for the DataGrid, find out what events lead up to the painting of the scrollbar... modify those events by customizing the paint, and see how it goes from there. To do that though, you'd have to find out the signature for each of the control graphics within the datagrid.
All in all, I think it'd be difficult to do. Here're a couple links you can look up
-- This link shows you how to change the scrollbar, but since it's overriding scrollbar, you probably won't be able to replace the reference to your customized scrollbar.. but it's a start
http://www.dotnet247.com/2
-- This links tells you that you CAN change the color, but... I'm not having any success
http://www.dotnet247.com/2
Oh yeah, forgot to include this site..
http://24.199.8.122/Defaul
If you goto their download page, and grab the Demo download... it includes the .DLL which you could add into your project. In it, contains ScrollBarEX that have fully colorable scrollbars.
They even have gradients on those scrollbars!
But I can't figure how to use these scrollbars in the datagrid... if anyone knows how, please post!
Thanks =)
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: morphinex {http:#9387721}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: mondayblueboyPosted on 2003-09-17 at 20:42:31ID: 9383630
You can use css?
ff; fff; 600; 6600; :#ffffff; #ff6600;
lor:#fffff f;scrollba r-track-co lor:#fffff f;scrollba r-arrow-co lor:#ff660 0;scrollba r-shadow-c olor:#ff66 00;scrollb ar-darksha dow-color: #ffffff;sc rollbar-hi ghlight-co lor:#ff660 0")
.background
{
scrollbar-face-color:#ffff
scrollbar-track-color:#fff
scrollbar-arrow-color:#ff6
scrollbar-shadow-color:#ff
scrollbar-darkshadow-color
scrollbar-highlight-color:
}
Or
datagrid.Attributes.Add( "Style","scrollbar-face-co
Hope this helps
Cheers!