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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Turning off selection rectangle

Thread ID:

Created:

Updated:

Platform:

Replies:

101632 Nov 9,2011 05:28 PM UTC Nov 14,2011 07:24 AM UTC WinForms 2
loading
Tags: Diagram
Johnathan Tunnicliffe
Asked On November 9, 2011 05:28 PM UTC

Hi,

I was wondering if it's possible to turn off the selection rectangle (the rectangle that is drawn from the mouse as you drag on the canvas). See the image attached for what i mean.

Obviously when using the pan tool etc the rectangle isn't drawn when you drag on the canvas. Is there anyway to replicate this?

Thanks,
John



diagramSelectionRectangle_48a3eab2.zip

Johnathan Tunnicliffe
Replied On November 9, 2011 07:38 PM UTC

To answer my own question it looks like I can override SelectTool and override the Draw method and set that as my active tool on the controller of my diagram.


Amsath Ali M [Syncfusion]
Replied On November 14, 2011 07:24 AM UTC

Hi Johnathan,

Thanks for your interest in Syncfusion products.

We suggest you to Set the SelectTool.TrackingStyle’s ‘LineColor’ property to ‘Transparent’ to hide the selection rectangle while dragging through the mouse. Please refer the below code snippet to achieve your requirement.

Here is the code snippet:
[C#]
void diagram1_MouseDown(object sender, MouseEventArgs e)
{
if (diagram1.Controller.ActiveTool.Name == "SelectTool")
{
((SelectTool)diagram1.Controller.ActiveTool).TrackingStyle.LineColor = Color.Transparent;
}
}

Here is the sample:
Forum SelectToolColor Change266915234.zip

Please try the above sample and let us know if you have any queries.

Regards,
Amsath Ali. M




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

;