Thanks, it works after I use form.begininvoke.
-----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of J. Merrill Sent: Friday, March 18, 2005 12:03 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] TreeView is complete white for a blink At 01:53 PM 3/18/2005, Tracy Ding wrote >Hi, >I have a treeview, using afterselect event to start a child form in MDI >container, but when data loading is big, the tree is complete white for a >blink. > >I tried to user Beginupdate/Endupdate, but it doesn't help. > >Any idea about this ? > >Tracy Ding Probably what's happening is that the treeview isn't re-painted (showing the selected node) until your afterselect handler finishes. One solution to a problem like this would be to call the routine to start the child form (in your afterselect) via form.BeginInvoke. That would let your afterselect handler exit, and the treeview's paint happen, before the slow loading code even starts. J. Merrill / Analytical Software Corp =================================== This list is hosted by DevelopMentorŪ http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com