Hi,

I see a lot about TreeView flickering while adding nodes to a treeview
control, but not really about what I'm experiencing.

I'm adding nodes to a TreeView control, but first, to ensure I don't
already have a node somewhere in the tree with the same name, I
perform a recursive search of the nodes for nodes containing a
specified text value. The TreeView control flickers while searching
the nodes.

I've tried using .SuspendLayout() and .ResumeLayout() before and after
each search is initiated, but it still flickers. Any ideas on how I
can keep the control from flickering while searching the nodes?

Thanks,

Charlie

Re: TreeView flickering while searching nodes by Tom

Tom
Wed Oct 03 09:38:00 PDT 2007

Are you by chance setting any TreeViewor TreeNode properties during your
recursive search, such as SelectedNode? Iterating recursively over the Nodes
collections of TreeNodes doesn't seem to cause anything like that for me.

Tom Dacon
Dacon Software Consulting

"Charles Crawford" <echuck66@gmail.com> wrote in message
news:1191384752.009111.152890@22g2000hsm.googlegroups.com...
> Hi,
>
> I see a lot about TreeView flickering while adding nodes to a treeview
> control, but not really about what I'm experiencing.
>
> I'm adding nodes to a TreeView control, but first, to ensure I don't
> already have a node somewhere in the tree with the same name, I
> perform a recursive search of the nodes for nodes containing a
> specified text value. The TreeView control flickers while searching
> the nodes.
>
> I've tried using .SuspendLayout() and .ResumeLayout() before and after
> each search is initiated, but it still flickers. Any ideas on how I
> can keep the control from flickering while searching the nodes?
>
> Thanks,
>
> Charlie
>



Re: TreeView flickering while searching nodes by Charles

Charles
Wed Oct 03 18:51:11 PDT 2007

I'll check, but I could have sworn it doesn't.


Re: TreeView flickering while searching nodes by G

G
Fri Oct 05 02:28:24 PDT 2007

Make sure you call BeginUpdate before adding large number of nodes and
EndUpdate afterwards.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------


"Charles Crawford" <echuck66@gmail.com> wrote in message
news:1191384752.009111.152890@22g2000hsm.googlegroups.com...
> Hi,
>
> I see a lot about TreeView flickering while adding nodes to a treeview
> control, but not really about what I'm experiencing.
>
> I'm adding nodes to a TreeView control, but first, to ensure I don't
> already have a node somewhere in the tree with the same name, I
> perform a recursive search of the nodes for nodes containing a
> specified text value. The TreeView control flickers while searching
> the nodes.
>
> I've tried using .SuspendLayout() and .ResumeLayout() before and after
> each search is initiated, but it still flickers. Any ideas on how I
> can keep the control from flickering while searching the nodes?
>
> Thanks,
>
> Charlie
>