RectangleTool is blocking other tools.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

RectangleTool is blocking other tools.

Post by Srinivas Avancha » Mon Nov 17, 2008 7:56 pm

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);

}

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 Nov 18, 2008 10:59 am

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.
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

Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

Does not draw Fibonacci

Post by Srinivas Avancha » Tue Nov 18, 2008 1:30 pm

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.

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 Nov 18, 2008 1:37 pm

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.
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

Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

Post by Srinivas Avancha » Tue Nov 18, 2008 1:58 pm

Hi Narcís,

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

thanks
Srinivas

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 Nov 18, 2008 2:05 pm

Hi Srinivas,

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

Thanks in advance.
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

Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

Post by Srinivas Avancha » Tue Nov 18, 2008 2:34 pm

Hi Narcis,

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

Thanks
Srinivas

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 Nov 18, 2008 3:56 pm

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.
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

Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

Post by Srinivas Avancha » Tue Nov 18, 2008 4:29 pm

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]

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

Post by Narcís » Thu Nov 20, 2008 9:41 am

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.
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

Srinivas Avancha
Newbie
Newbie
Posts: 41
Joined: Wed Jan 30, 2008 12:00 am

Post by Srinivas Avancha » Thu Nov 20, 2008 2:23 pm

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.

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

Post by Narcís » Thu Nov 20, 2008 2:35 pm

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.
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