DrawLine Tool NewLine Event Changed

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
avatar
Newbie
Newbie
Posts: 18
Joined: Mon Jun 20, 2005 4:00 am
Location: Calgary, Canada
Contact:

DrawLine Tool NewLine Event Changed

Post by avatar » Fri Dec 23, 2005 9:35 pm

Hi Narcis,

I have just installed v2.0.2179.21171 maintenance release. I was unable to use the last few releases because of problems with the print margins, so I am not sure when this changed.

In my app the user can draw a line. The user clicks hold and drags to form a line.
The NewLine Event fires when the new line is complete, and the mouse is released. The line has both a start and end which I capture to evaluate the date between the points.
In this new release the NewLine Event fires with the mouse down and as there is no line there is nothing to capture as yet.

In this new release how do I capture the NewLine MouseUp event after the line is drawn?

Thanks

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

Post by Narcís » Tue Dec 27, 2005 11:19 am

Hi avatar,
I have just installed v2.0.2179.21171 maintenance release. I was unable to use the last few releases because of problems with the print margins, so I am not sure when this changed.
This has been fixed as you can check here.
In my app the user can draw a line. The user clicks hold and drags to form a line.
The NewLine Event fires when the new line is complete, and the mouse is released. The line has both a start and end which I capture to evaluate the date between the points.
In this new release the NewLine Event fires with the mouse down and as there is no line there is nothing to capture as yet.

In this new release how do I capture the NewLine MouseUp event after the line is drawn?
Thanks for the report, I've been able to reproduce it and this is a bug. I've added it to our defect list to be fixed for future releases. In the meantime, you can use something like the code below and implement what you wanted the NewLine event should do in the if caluse in TChart's MouseUp event.

Code: Select all

		private int count;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			line1.FillSampleValues();
			count=drawLine1.Lines.Count;
		}	

		private void tChart1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			if (drawLine1.Lines.Count>count)
			{
				count=this.drawLine1.Lines.Count;
				tChart1.Header.Text=count.ToString();
			}
		}
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