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
close icon

Help for right image overlaying.

I see that you only show the left image overlay in the samples. Is it possible to show the left image and the right image overlay in the same sample. Because I am able to do only one at a time but my application consists of both the images. Please see my sample attached and help me. Thanks in advance. regards, Joy

2 Replies

DT Deepa TS Syncfusion Team April 4, 2006 09:14 AM UTC

Hi Joy, Sorry for the inconvenience caused. I have created a sample as per your specification.The sample illustrates the possiblity to show the LeftImage overlay and the RightImage overlay in the same sample. The property "RightImagesX" of the node plays a great role in setting the RightImage overlay.It describes the horizontal distance between the treeBorder and the beginning of the node''s right image. private void treeViewAdv1_AfterNodePaint(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvPaintEventArgs e) { Point pt=this.treeViewAdv1.PointToClient(new Point(MousePosition.X,MousePosition.Y)); TreeNodeAdv node=this.treeViewAdv1.GetNodeAtPoint(pt); node = this.treeViewAdv1.SelectedNode; if(node!=null) { if(node.Text=="Asia" ||node.Text=="India"||node.Text=="China"||node.Text=="Europe" || node.Text=="Britain"||node.Text=="France"||node.Text=="North America"|| node.Text=="United States"||node.Text=="Canada") { //setting the LeftImage overlay pt = new Point(node.LeftImagesX, node.TextAndImageBounds.Y); e.Graphics.DrawImage(imageList1.Images[26], pt ); } else { //setting the RightImage overlay pt = new Point(node.RightImagesX, node.TextAndImageBounds.Y); e.Graphics.DrawImage(imageList2.Images[9], pt ); } } } Please take a look at the attached sample and let me know if this helps you. Thanks for your interest in Syncfusion products. Regards, Deepa.

ImageOverLay.zip


AD Administrator Syncfusion Team April 7, 2006 09:36 AM UTC

Hi deepa, yes this works fine. Thanks.

Loader.
Live Chat Icon For mobile
Up arrow icon