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.
Unfortunately, activation email could not send to your email. Please try again.

How do I set the icon image for an individual TreeNodeAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

14402 May 26,2004 10:18 AM May 27,2004 08:25 AM Windows Forms 5
loading
Tags: Tools
Derek Stafford
Asked On May 26, 2004 10:18 AM

Ok, I admit it, I''m confused. I want to be able to individually set the icons for different TreeNodeAdvs in my TreeViewAdv but I can''t work out how. Can anyone provide me with a simple code example?

Administrator [Syncfusion]
Replied On May 26, 2004 07:05 PM

Hi, 1. Set the RightImagList and LeftImageList properties of the TreeViewAdv to an ImagList. this.treeViewAdv1.LeftImageList = this.imageList1; this.treeViewAdv1.RightImageList = this.imageList1; 2. Set the approproiate ImageIndices value for the left and right images : treeNodeAdv1.LeftImageIndices = new int[] {0}; treeNodeAdv1.RightImageIndices = new int[] {1}; Please refer to the treenodeadvsample_attached that illustrates this. Let me know if you need further assistance. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Derek Stafford
Replied On May 27, 2004 03:41 AM

Hi, Still can''t get this to work. LeftImageIndices is not a member of TreeNodeAdv. The nearest thing I could find was TreeNodeAdv.NodeData.LeftImagesIndexes but when I tried this although I received no build or run errors my 16x16 256 colour .ico never appeared. My code is as follows: private System.Windows.Forms.ImageList FolderImages; private void InitializeComponent() { this.FolderImages = new System.Windows.Forms.ImageList(this.components); // // FolderImages // this.FolderImages.ImageSize = new System.Drawing.Size(16, 16); this.FolderImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("FolderImages.ImageStream"))); this.FolderImages.TransparentColor = System.Drawing.Color.Transparent; } public SessionRootNode CreateSessionRootNode(string text) { SessionRootNode sessionRootNode = new SessionRootNode(text); // subclass of TreeNodeAdv sessionRootNode.NodeData.LeftImageIndexes = new int[] {0}; return sessionRootNode; } I''ve only just discovered the latest version 2.0 release and am currently downloading it. Is LeftImageIndices specific to version 2? >Hi, > >1. Set the RightImagList and LeftImageList properties of the TreeViewAdv to an ImagList. > >this.treeViewAdv1.LeftImageList = this.imageList1; >this.treeViewAdv1.RightImageList = this.imageList1; > >2. Set the approproiate ImageIndices value for the left and right images : > >treeNodeAdv1.LeftImageIndices = new int[] {0}; >treeNodeAdv1.RightImageIndices = new int[] {1}; > >Please refer to the treenodeadvsample_attached that illustrates this. Let me know if you need further assistance. Thanks for choosing Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 27, 2004 05:44 AM

Hi, The TreeViewAdv control has undergone several changes since v1.6. We strongly encourage you to upgrade to v2.0 as this control is much more stable in terms of fixes and rich in features. LeftImageIndices and RightImageIndices are the TreeViewAdv''s properties (not TreeNodeAdv''s) and these features are available in v2.0 only. Please open an incident in DirectTrac in this regard, and I will send you the download instructions to our latest v2.0 release. We appreciate your cooperation, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Horselover Fat
Replied On May 27, 2004 07:56 AM

Guru, Downloaded and installed 2.0.5.1 ok and have now managed to get it working. By the way, your last post stated that ''LeftImageIndices and RightImageIndices are the TreeViewAdv''s properties (not TreeNodeAdv''s)''. This is not correct. They are properties of a TreeNodeAdv. Thought I ought to mention this for other people who may read this topic. >Hi, > >The TreeViewAdv control has undergone several changes since v1.6. We strongly encourage you to upgrade to v2.0 as this control is much more stable in terms of fixes and rich in features. LeftImageIndices and RightImageIndices are the TreeViewAdv''s properties (not TreeNodeAdv''s) and these features are available in v2.0 only. Please open an incident in DirectTrac in this regard, and I will send you the download instructions to our latest v2.0 release. We appreciate your cooperation, and thanks for choosing Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 27, 2004 08:25 AM

Hi, Thanks for the update. My apologies for the incorrect update earlier. I meant to say that the LeftImageLists and RightImageLists are the properties of the TreeViewAdv, and LeftImageIndices and RightImageIndices of the TreeNodeAdv (as illustrated by the code snippets posted in one of my earlier updates). We appreciate your interest in Syncfusion. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

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.

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.

;