开发者

Problems seeing the last node in a TreeView

开发者 https://www.devze.com 2022-12-17 06:35 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号