Change the scrollbars' UI

A

Alex Fu

Hi,



I need to change the scrollbars' UI of DataGrid (C#, Framework 1.1). I tried
many ways, but I can not implement it yet. Please help me if you know how to
do it.

I have implemented a scrollbar (public class HorizontalScrollBar :
System.Windows.Forms.HScrollBar) by Painting itself. But the scrollbar
properties of DataGrid are not possible to be overridden. The properties are
declared like this: protected ScrollBar HorizScrollBar. What should I do?

Or does it possible for C# to change the components' L&F (Look and feel)
like Java Swing?



Regards,



Alex Fu
 
P

Paul Harvey

You can essentially change the look & feel of a Windows app by calling
Application.EnableVisualStyles() before you create an instance of your form.

If you're using .NET 2003, you also need to follow this with a call to
Application.DoEvents(), and set FlatStyle to System on controls that have
the FlatStyle property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top