Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2007

Tip: Looking for answers? Try searching our database.

TreeView flickering while searching nodes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Crawford - 03 Oct 2007 05:12 GMT
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
Tom Dacon - 03 Oct 2007 17:38 GMT
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

> Hi,
>
[quoted text clipped - 14 lines]
>
> Charlie
Charles Crawford - 04 Oct 2007 02:51 GMT
I'll check, but I could have sworn it doesn't.
G Himangi - 05 Oct 2007 10:28 GMT
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
---------

> Hi,
>
[quoted text clipped - 14 lines]
>
> Charlie

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.