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.

Color of Node

Thread ID:

Created:

Updated:

Platform:

Replies:

43020 Apr 12,2006 03:49 AM Apr 12,2006 05:38 AM Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On April 12, 2006 03:49 AM

Hi Froum, How to high light the color of the selected node. I mean, is there any way to change the color of the selected node. Any help will be appreciated. Thanks, Regards, Thomas

Deepa TS [Syncfusion]
Replied On April 12, 2006 05:38 AM

Hi Thomas, The SelectedNode in the TreeViewAdv can be highlighted through changing its color by handling TreeViewAdv BeforeNodePaint Event handler: Code: private void treeViewAdv1_BeforeNodePaint(object sender,Syncfusion.Windows.Forms.Tools.TreeNodeAdvPaintEventArgs e) { if(e.Node.IsSelected==true) { SolidBrush brush=new SolidBrush(Color.LightSalmon); Rectangle rec=new Rectangle(e.Node.TextBounds.X,e.Node.TextBounds.Y, e.Node.TextBounds.Width,e.Node.TextBounds.Height); e.Graphics.FillRectangle(brush,rec); } } Please take a look at the attached sample and let me know if this helps you. SelectedNodeHighlight Thanks for your interest in Syncfusion products. Kind Regards, Deepa.

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.

;