Windows Develop Bookmark and Share   
 index > Windows Forms General > How to custom painting on the listview control and scrollbar?
 

How to custom painting on the listview control and scrollbar?

I am customize the listview control, and I also have a problem. I'm trying to repaint all column headers in listview but I can't repaint on the empty header.

And I also want to custom the scroll bar.

Please see my picture to understand my questions:
http://img30.imageshack.us/img30/7092/88496647.png

Thanks.
  • Moved byHarry ZhuMSFTWednesday, September 30, 2009 4:15 AMrelating to listview control (From:Visual C# General)
  •  
Le Vo Quang  Monday, September 28, 2009 2:10 AM

This may be a solution.

Drawing outside of column area in listview column header

http://stackoverflow.com/questions/1433292/drawing-outside-of-column-area-in-listview-column-header

 

For drawing scrollbar, you can change scrollbar image and catch the mouseDown event.

The following link tells about this.

How to skin scrollbars for Panels, in C#

http://www.codeproject.com/KB/miscctrl/customscrollbar.aspx

 

Hope this helps.


Best regards,
Ling Wang 


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Sunday, October 04, 2009 11:54 AM
You have to draw it on your own: Below are some links that show you
http://bytes.com/topic/c-sharp/answers/599185-listview-header-color
http://www.codeproject.com/KB/list/customheader.aspx
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_21779713.html

kaymaf
I hope this helps, if that is what you want, just mark it as answer so that we can move on
kaymaf  Monday, September 28, 2009 2:53 AM
You have to draw it on your own: Below are some links that show you
http://bytes.com/topic/c-sharp/answers/599185-listview-header-color
http://www.codeproject.com/KB/list/customheader.aspx
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_21779713.html

kaymaf
I hope this helps, if that is what you want, just mark it as answer so that we can move on

I tried your suggestions but not effect. Please see my screenshot at first post to understand. Thanks.
Le Vo Quang  Monday, September 28, 2009 9:26 AM

This may be a solution.

Drawing outside of column area in listview column header

http://stackoverflow.com/questions/1433292/drawing-outside-of-column-area-in-listview-column-header

 

For drawing scrollbar, you can change scrollbar image and catch the mouseDown event.

The following link tells about this.

How to skin scrollbars for Panels, in C#

http://www.codeproject.com/KB/miscctrl/customscrollbar.aspx

 

Hope this helps.


Best regards,
Ling Wang 


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Sunday, October 04, 2009 11:54 AM

You can use google to search for other answers

Custom Search

More Threads

• Issues with MyApp.exe.config
• how to format this datagridview
• report generator
• image viewer please. help me
• Progressbar
• Virtual ListViewItems and Images
• How to convert two 16bit numbers in to 32bit float number
• C# Window label Text
• editable DataGridViewComboBoxColumn
• How to create Arrow Line Control?