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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Treeview node images

Thread ID:





21460 Nov 10,2004 10:38 PM UTC Jun 6,2008 12:13 PM UTC WinForms 4
Tags: Tools
Asked On November 10, 2004 10:38 PM UTC

How can I set the treenode images to whatever I want. I can set the curent image of a node using. nod.LeftImageIndices = new int[] {41}; //closed folder. Most other constrols use image lists and an image index to specify the image for a control, is there something similar. Or something to set the image using a file eg. nod.image = "test.ico";

Administrator [Syncfusion]
Replied On November 11, 2004 10:56 PM UTC

Hi Rich, We do not have an "Form.Icon" like property associated with the TreeNodeAdv, but you could use the following approach if you wish to directly assign image files to the TreeNodeAdvs : Bitmap bmp1 = new Bitmap("..\\..\\shape9.ico"); Bitmap bmp2 = new Bitmap("..\\..\\shape10.ico"); Bitmap bmp3 = new Bitmap("..\\..\\shape11.ico"); Bitmap bmp4 = new Bitmap("..\\..\\shape12.ico"); Bitmap bmp5 = new Bitmap("..\\..\\shape13.ico"); this.imageList1.Images.Add(bmp1); this.imageList1.Images.Add(bmp2); this.imageList1.Images.Add(bmp3); this.imageList1.Images.Add(bmp4); this.imageList1.Images.Add(bmp5); int count=0; foreach (TreeNodeAdv node in this.treeViewAdv1.Nodes) { node.LeftImageIndices = new int[] {count}; node.RightImageIndices = new int[] {count}; count++; } Please refer to the test sample attached here and let me know if this meets your requirements. Thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Replied On November 12, 2004 02:06 AM UTC

Thanks Guru, this will do nicely

Bill Rhodes
Replied On June 5, 2008 07:08 AM UTC

Hey how can I do this for the asp.net tree?

>Thanks Guru, this will do nicely

Melba Winshia [Syncfusion]
Replied On June 6, 2008 12:13 PM UTC

Hi Billy,

If your intention is to set images to the TreeNode of Syncfusion asp.net Treeview control, then please refer below link to get more details on this issue:


And also, please refer the below sample:


Please try this and let me know if this helps.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon