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.

Need after check event to get triggered when a node''s text is clicked

Thread ID:

Created:

Updated:

Platform:

Replies:

42550 Mar 31,2006 07:25 AM Mar 31,2006 09:35 AM Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 31, 2006 07:25 AM

Hi, We generally used to check the nodes using checkbox. Is it possible to get the after check event triggered when a node''s text is clicked instead of the checkbox. Thanks and regards, Jubin

Deepa TS [Syncfusion]
Replied On March 31, 2006 09:35 AM

Hi Jubin, It is possible to get the AfterCheck event triggered when a node''''s text is clicked instead of the checkbox by handling MouseDown event along with the PointToClient and PointToNode method. private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == MouseButtons.Left) { // get the point where the mouse was left clicked Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); // get the node at the left click point TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); if (node != null) { // see if the label was clicked on if (node.TextAndImageBounds.Contains(p)) { node.Checked =!node.Checked; } } } } Please take alook at the attached sample and let me know if this helps you. LabelCheck.zip 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.

;