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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Turning off selection rectangle

Thread ID:





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


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?



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:
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.

Amsath Ali. M


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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