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.

Help for right image overlaying.

Thread ID:

Created:

Updated:

Platform:

Replies:

42649 Apr 4,2006 02:26 AM Apr 7,2006 05:36 AM Windows Forms 2
loading
Tags: Tools
Administrator [Syncfusion]
Asked On April 4, 2006 02:26 AM

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

Deepa TS [Syncfusion]
Replied On April 4, 2006 05:14 AM

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

Administrator [Syncfusion]
Replied On April 7, 2006 05:36 AM

Hi deepa, yes this works fine. Thanks.

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.

;