Nodes display as whitespace when scrollable is set to false, and more
nodes are cleared and recreated than will fit into the space available.
Steps to replicate:
Create a form, with a button and a treeview that can display less than
12 Nodes at once . Put this code in button.Click
treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode("Test1"));
treeView1.Nodes.Add(new TreeNode("Test2"));
treeView1.Nodes.Add(new TreeNode("Test3"));
treeView1.Nodes.Add(new TreeNode("Test4"));
treeView1.Nodes.Add(new TreeNode("Test5"));
treeView1.Nodes.Add(new TreeNode("Test6"));
treeView1.Nodes.Add(new TreeNode("Test7"));
treeView1.Nodes.Add(new TreeNode("Test8"));
treeView1.Nodes.Add(new TreeNode("Test9"));
treeView1.Nodes.Add(new TreeNode("Test10"));
treeView1.Nodes.Add(new TreeNode("Test11"));
treeView1.Nodes.Add(new TreeNode("Test12"));
Click the button _twice_. You'll see that everything looks fine.
Now change Scrollable to false on the TreeView and repeat the
experiment.
The TreeView looks blank. But if you click on it, (on the far left)
you'll discover there are entries there - they're just blank. In fact,
adding a handler for treeView1.AfterSelect with
Console.WriteLine(e.Node.Text);
in it, shows that the treenodes are there, and have text - they just
display as whitespace
Anyone else replicate this?
Andy D