.NET 2.0 Double buffering on list view

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

In the documentation for the listview for owner drawn it says this

Note
To avoid issues with graphics flickering when owner drawing, override
the ListView control and set the DoubleBuffered property to true.




Now, I am owner drawing my list view items, and yes it does flicker a lot...
now to enable double buffering do i have to make a whole new custom control
and inherit the list view just to override it to turn on double buffering?
or is there some way i can do this in code and override the listview and
enable doublebuffering with out having to make a new inherited control?
thanks!
 
The SetStyle method is protected. To access it you have no choice but to
derive from the control and override the relavent methods.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top