PC Review


Reply
Thread Tools Rate Thread

How do I paint a Custom ListView in DesignMode?

 
 
Tom P.
Guest
Posts: n/a
 
      14th May 2009
I am inheriting from a ListView and doing my own painting. I am
overriding the OnDrawSubItem() method and it works fine... at runtime.
At design time it just looks system gray.

I've got the following styles set:
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.UserMouse, true);
this.SetStyle(ControlStyles.UserPaint, true);

I've even set these styles for the base object. I can see the OnPaint
event fire during design time, but not the OnDrawSubItem

Is there a way to paint during design time?

Tom P.
 
Reply With Quote
 
 
 
 
Andreas Johansson
Guest
Posts: n/a
 
      15th May 2009
Here is a small article how to do some design time custom painting that may
help you further.
http://www.codeguru.com/csharp/cshar...icle.php/c7551


 
Reply With Quote
 
Andreas Johansson
Guest
Posts: n/a
 
      15th May 2009
Here is a small article how to do some design time custom painting that may
help you further.
http://www.codeguru.com/csharp/cshar...icle.php/c7551


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I paint a Custom ListView in DesignMode? Tom P. Microsoft C# .NET 0 14th May 2009 05:44 PM
ListView sort only sorts on paint? ken_foust@hotmail.com Microsoft Dot NET Framework Forms 0 11th Aug 2006 04:23 PM
Control.DesignMode and OnPaint in Custom Control =?Utf-8?B?RGF2ZSBIdW1waHJleQ==?= Microsoft Dot NET Framework Forms 2 24th Mar 2004 03:16 AM
ListView Paint Michelle Microsoft Dot NET Framework Forms 0 21st Nov 2003 11:27 PM
Paint method for a DataGrid or ListView Alex Feinman [MVP] Microsoft Dot NET Compact Framework 4 4th Nov 2003 03:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:17 PM.