How to clear selection of Selector tool?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
LT411
Newbie
Newbie
Posts: 17
Joined: Wed Jan 30, 2008 12:00 am

How to clear selection of Selector tool?

Post by LT411 » Tue Jul 15, 2008 7:19 pm

When I add the selector tool to a chart, it selects the chart and draws selection boxes in the four corners of the chart.

I would like to clear the selection so the chart is not selected and the boxes are not drawn unless the user clicks on the chart to select it.

I tried setting selector.Selection to null, but it is read-only.

I don't see any method to ClearSelection().

Is there any way to clear the selection?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 16, 2008 9:09 am

Hi LT411,

You can set the tool to not Active:

Code: Select all

			selector1.Active = false;
And enable it when the chart has been clicked, for example:

Code: Select all

		void tChart1_Click(object sender, EventArgs e)
		{
			selector1.Active = true;
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

LT411
Newbie
Newbie
Posts: 17
Joined: Wed Jan 30, 2008 12:00 am

Post by LT411 » Wed Aug 20, 2008 3:49 pm

Thanks for the reply. That works, however now I've run into another problem.

I'm using the selector to select a line on the chart and delete it. When I do, the selection boxes remain. I tried changing the Active property to false, then true; but the selection boxes remain.

I really need a way to clear the selection or to select the entire chart to clear the selection boxes from where the line used to be.

Any ideas?

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 21, 2008 9:34 am

Hello,

you can add this line :
selector1.Dispose();
after the Series has been removed.

Post Reply