Page 1 of 1

DrawLine Tool NewLine Event Changed

Posted: Fri Dec 23, 2005 9:35 pm
by 9637235
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

Posted: Tue Dec 27, 2005 11:19 am
by narcis
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();
			}
		}