We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Tree View FAQ

Hi, Following is the code scnippet of tree view in C# I want to change the image of selected node. but I am not able to do that. Will you please help me. private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { MessageBox.Show(node.ToString()); // shows correct selected Node MessageBox.Show(e.Node.ToString()); // shows correct selected Node e.Node.ImageIndex = 2; // chages the image of previous node, instead I want it to be changed for selected node //node.ImageIndex = 2; } Thanks and regards, Bipin Sawant

Live Chat Icon For mobile
Up arrow icon