Page 1 of 1

How to clear selection of Selector tool?

Posted: Tue Jul 15, 2008 7:19 pm
by 13048148
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?

Posted: Wed Jul 16, 2008 9:09 am
by narcis
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;
		}

Posted: Wed Aug 20, 2008 3:49 pm
by 13048148
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?

Posted: Thu Aug 21, 2008 9:34 am
by Pep
Hello,

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