Page 1 of 1

RectangleTool is blocking other tools.

Posted: Mon Nov 17, 2008 7:56 pm
by 13048149
RectangleTool is blocking other tools.
Cannot use DrawLine tool and Fibonacci tool after using RectangleTool. Can you provide a fix or solution for this.

Best Regards
Srinivas

TeeChart Version=3.5.3188.18562

Below is the code snippet.

private Steema.TeeChart.Tools.DrawLine drawLine1;
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
//line series created thru designer
line1.FillSampleValues(100);


//**********************************************************************
//Commenting the below line will make DrawLine and Fibonacci to work!
tChart1.Chart.Tools.Add(new RectangleTool());
//**********************************************************************



this.drawLine1 = new Steema.TeeChart.Tools.DrawLine();
this.tChart1.Tools.Add(this.drawLine1);

//
// drawLine1
//
this.drawLine1.NewLine += new Steema.TeeChart.Tools.DrawLineEventHandler(this.drawLine1_NewLine);
this.drawLine1.Select += new Steema.TeeChart.Tools.DrawLineEventHandler(this.drawLine1_Select);
this.drawLine1.DraggedLine += new Steema.TeeChart.Tools.DrawLineEventHandler(this.drawLine1_DraggedLine);
this.drawLine1.DragLine += new Steema.TeeChart.Tools.DrawLineEventHandler(this.drawLine1_DragLine);
this.drawLine1.Selecting += new Steema.TeeChart.Tools.DrawLineSelectingEventHandler(this.drawLine1_Selecting);
}

private void drawLine1_NewLine(Steema.TeeChart.Tools.DrawLine sender)
{
FibonacciTool fibToo = new FibonacciTool();
fibToo.StartX = sender.Lines[sender.Lines.Count - 1].StartPos.X;
fibToo.StartY = sender.Lines[sender.Lines.Count - 1].StartPos.Y;
fibToo.EndX = sender.Lines[sender.Lines.Count - 1].EndPos.X;
fibToo.EndY = sender.Lines[sender.Lines.Count - 1].EndPos.Y;
fibToo.TrendPen.Visible = false;
tChart1.Chart.Tools.Add(fibToo);

}

Posted: Tue Nov 18, 2008 10:59 am
by narcis
Hi Srinivas,

Code below works fine for me here. Can you please check if it works fine at your end?

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			line1.FillSampleValues(100);
			
			Steema.TeeChart.Tools.DrawLine drawLine1 = new Steema.TeeChart.Tools.DrawLine();
			tChart1.Tools.Add(drawLine1);

			tChart1.Chart.Tools.Add(new Steema.TeeChart.Tools.RectangleTool());
						
			drawLine1.NewLine += new Steema.TeeChart.Tools.DrawLineEventHandler(drawLine1_NewLine);
		}

		private void drawLine1_NewLine(Steema.TeeChart.Tools.DrawLine sender)
		{
			Steema.TeeChart.Tools.FibonacciTool fibToo = new Steema.TeeChart.Tools.FibonacciTool();
			fibToo.StartX = sender.Lines[sender.Lines.Count - 1].StartPos.X;
			fibToo.StartY = sender.Lines[sender.Lines.Count - 1].StartPos.Y;
			fibToo.EndX = sender.Lines[sender.Lines.Count - 1].EndPos.X;
			fibToo.EndY = sender.Lines[sender.Lines.Count - 1].EndPos.Y;
			fibToo.TrendPen.Visible = false;
			tChart1.Chart.Tools.Add(fibToo);
		}
Also notice there's a newer version available at the client area.

Thanks in advance.

Does not draw Fibonacci

Posted: Tue Nov 18, 2008 1:30 pm
by 13048149
Hi Narcís,
With the code you presented Fibonacci does not work.
If you swap addition of rectangletool and drawline as below, drawline will not work either.

Code: Select all

            tChart1.Chart.Tools.Add(new Steema.TeeChart.Tools.RectangleTool());
            tChart1.Tools.Add(drawLine1);

Thanks.

Posted: Tue Nov 18, 2008 1:37 pm
by narcis
Hi Srinivas,

Doing so doesn't plot DrawLine tool but Fibonacci tool is visible. I've added this issue (TF02013573) to the defect list. However, can you please confirm that the code I posted works as a workaround for you?

Thanks in advance.

Posted: Tue Nov 18, 2008 1:58 pm
by 13048149
Hi Narcís,

Sorry Narcis the answer is no. The Fibonacci is not visible.

thanks
Srinivas

Posted: Tue Nov 18, 2008 2:05 pm
by narcis
Hi Srinivas,

Could you please try using latest version available at the client area together with the example I posted?

Thanks in advance.

Posted: Tue Nov 18, 2008 2:34 pm
by 13048149
Hi Narcis,

It does not work in TeeChart, Version=3.5.3225.32185 either.

Thanks
Srinivas

Posted: Tue Nov 18, 2008 3:56 pm
by narcis
Hi Srinivas,

Ok, I've built my example project here in release mode with the very same TeeChart assembly version you are using. I've sent you the generated .exe. Could you place it together with the assembly version you mentioned and try running it? Does it work fine for you?

Thanks in advance.

Posted: Tue Nov 18, 2008 4:29 pm
by 13048149
Hi Narcis,

On running the exe you have sent and drawing a line I do not get any Fibonacci. I am sending you the image.

Thanks
[/img]

Posted: Thu Nov 20, 2008 9:41 am
by narcis
Hi Srinivas,

We have investigated the issue here and with the .exe I sent you only first line doesn't draw Fibonacci tools. Successive lines worked. That was adding RectangleTool after DrawLine tool.

Adding first the RectangleTool didn't draw any line but plotted Fibonacci tools for second line and successive.

Anyway, we have fixed the issue for the next maintenance release.

Posted: Thu Nov 20, 2008 2:23 pm
by 13048149
Hi Narcís,

I do see the same behavior at my end. I am glad we do not have to split hairs as to why its behaving differently on your side and my side. When will the next release be?

Best Regards
Srinivas.

Posted: Thu Nov 20, 2008 2:35 pm
by narcis
Hi Srinivas,

It's due to be out on week 51 (from 15th to 21st December). It will be announced on this forum and our RSS news feed.