Re: Overriding ListView OnPaint?

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
 
S

Simon Trew

By the way you can combine the calls to SetStyle:

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

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