RectangleTool is blocking other tools.
Posted: 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);
}
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);
}