DrawLine event for deselecting?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

DrawLine event for deselecting?

Post by WD_Gordon » Wed Oct 15, 2008 1:59 pm

Hi,

I have code where if a user selects a horizontal line it places a box over the right axis at that position and shows the price of where the line is currently placed. I do this using the Selecting event.

When I deselect the line I would like to remove the box so that it is no longer visible. How can I determine when the box is deselected?

Thanks,
Kevin

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 Oct 15, 2008 2:24 pm

Hi Kevin,

You can use MouseDown or MouseMove events for that. For example, if you are using an Annotation tool for displaying the box you can do this:

Code: Select all

		void tChart1_MouseDown(object sender, MouseEventArgs e)
		{			
			if (drawLine1.Clicked(e.X,e.Y) == null) //No line selected
			{
				annotation1.Active = false;		
			}
		}
Hope this helps!
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

Post Reply