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.
Syncfusion Feedback

Background color change.

Thread ID:

Created:

Updated:

Platform:

Replies:

40903 Feb 16,2006 05:16 AM UTC Feb 16,2006 09:54 AM UTC Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On February 16, 2006 05:16 AM UTC

Hi Syncfusion, I am working with tree control. I want the node''s background color to be changed when it is right clicked., i.e when I right click, the selected node is supposed to display some message. I want this right clicked node to be highlighted with the specified background color. Thanks in Advance. Carl.

Deepa TS [Syncfusion]
Replied On February 16, 2006 09:54 AM UTC

Hi Carl, Node''s background colors can be controlled by the InactiveSelectedNodeBackground and the InactiveSelectedNodeForeColor properties of the TreeViewAdv control. Code: this.treeViewAdv1.HideSelection = false; private void treeViewAdv1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { if(e.Button == MouseButtons.Right) { Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); this.treeViewAdv1.SelectedNode = node; MessageBox.Show("Rightclicked on " + node.Text); } } Please take a look at the attached sample and let me know if this helps you. Thanks for your continued interest in Syncfusion Products. Regards, Deepa.T.S

NodeBackground.zip

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.

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

;