For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2004 > annoying flicker in treeview









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author annoying flicker in treeview
Tomas Deman

2004-06-03, 7:31 pm

Hi,

My treeview is flickering whenever I change the caption of a TreeNode.
I read I can avoid most of it by using a technique called "double
buffering".
I inherited the Treeview control and added following code to the constructor
of the new class:

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

This doesn't work for me. The nodes don't get painted anymore!
What am I doing wrong?

Thanks for any help,
Tomas


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com