I can set the Treeview selected node using code, but it's appearance does not change.
TreeNode selectedNode = treeView1.SelectedNode; TreeNode newNode = new TreeNode("I am new"); selectedNode.Nodes.Add(newNode); treeView1.SelectedNode = newNode; When I select nodes using my mouse the background color and fore colors change. I want the same thing to happen when I select a node using code. How can I change the appearance of a Winforms TreeView SelectedNode using C#? Thanks!