I'm having an issue with the TreeView in Visual Studio 2008. I'm adding the TreeView to my form, loading it with data at runtime, and then the last object in the list ends up being farther down than the scroll bar will go. The only way to see this 开发者_C百科object is by opening up one of the other nodes and closing it. Does anyone know a way of avoiding this issue?
Not seen this behaviour before, sounds like it could be a drawing issue. Can you post some code to demonstrate what you're doing to ensure there is nothing crazy going on?
One thing I might suggest trying is to call a treeview.SuspendLayout() and ResumeLayout() once you've added your nodes. See if that makes any difference.
EDIT
Spotted this Issue
Suggestions to fix are:
i) Disabling visual styles.
ii) Adding an empty node to the end of the list.
精彩评论