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

Getting the rect of the plus/minus region in TreeViewAdv?

Thread ID:

Created:

Updated:

Platform:

Replies:

28457 May 2,2005 10:02 PM UTC May 4,2005 02:52 PM UTC Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On May 2, 2005 10:02 PM UTC

Hello, Using TreeViewAdv, I want to get the +/- rect of a node; is there a better way to get it than this: Rectangle rect = new Rectangle( node.Bounds.X- node.TreeView.GutterSpace, node.Bounds.Y, node.TextAndImageBounds.X-2, node.TextAndImageBounds.Height); I modify the rect using GutterSpace and 2 because this expands the rect to include the boundary that behaves like the +/- but visually isn''t. I''m concerned that font and/or icon changes might invalidate these adjustments. Not GutterSpace so much, but the padding between the +/-; is there a property that returns this? I couldn''t find one. It might also be nice if there was a node property that returned the actual +/- rect, and perhaps even the visual +/- rect also. Thanks. Keith

Administrator [Syncfusion]
Replied On May 4, 2005 02:52 PM UTC

Hi Keith, The following code should provide the coordinates of the top-left corner of the collapse button of a TreeNodeAdv in terms of screen coordinates : Point point = this.treeViewAdv1.PointToScreen(this.treeViewAdv1.NodeToPoint(node)); point = new Point (point.X+node.NodeX, point.Y); Please refer to the test sample attached that illustrates this. Here the mouse cursor gets positioned appropriately when the buttons are clicked. Let me know if this works for you. We have considered this as a feature request (feature# 188) and will add a CollapseButtonRectangle property to the TreeNodeAdv in the near future. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

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

;