TreeView Flashes?

P

PeteCresswell

Got a form with a TreeView on it.

The TreeView shows a list of things in the DB.

As the user walks the TreeView or clicks on nodes, TreeView.NodeClick
reloads the screen with everything the user always wanted to know
about that node.

It's quite a bit of code and it takes awhile - maybe 2-3 seconds
currently.

I'm trying to speed it up.

But in the process, I notice that somehwhere in the screen load
process the contents of the TreeView disappear - leaving it as just a
white rectangle - and then they reappear at the end of the process -
giving a "flash" to the user.

Quite annoying IMHO.

I've stepped through the code line-by-line, but when I do that, the
TreeView never goes white.

I've also searched the code, finding all references to the TreeView
object - trying to find some statement that sounds like it would make
it go white. No luck.

I'm pretty sure that the Tree isn't getting .Cleared and then reloaded
bc the load process displays some status messages and takes several
seconds - neither of which is apparent.

Can anybody think of something that would make the contents of a
TreeView disappear and then reappear?
 
B

Bill Mosca

TreeViews load item by item and then refresh. To get away from that, I fill
the treeview on form_load. As long as you are not changing content after the
form is open, you won't see any flash.
 
P

(PeteCresswell)

Per Bill Mosca:
As long as you are not changing content after the
form is open, you won't see any flash.

Content in the TreeView, right?

Seems like that's the situation here.

But what I'm taking away from this is that maybe I'm lying about
that.

I guess I'd better step through the code some more and see if
maybe I'm updating a node or something somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top