Re: Overriding ListView OnPaint?

  • Thread starter Thread starter Chris G
  • Start date Start date
C

Chris G

I used all of these in the constructor:

SetStyle(ControlStyles.DoubleBuffer,true);
SetStyle(ControlStyles.AllPaintingInWmPaint,true);
SetStyle(ControlStyles.UserPaint,true);

with everything else the same (for groupBox), and it worked fine ( and
flicker free =) )

It might be that most of the painting for the ListView actually gets
done by OnDrawItem? Try overriding that.

-cg
 
By the way you can combine the calls to SetStyle:

SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintinginInWmPaint |
ControlStyles.UserPaint, true);
 
Back
Top