Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2002

Summary: TSelectorTool detecting TAnnotationTools in the wrong order
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ToolsAssignee: yeray alonso <yeray>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=16832
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2018-02-26 04:13:12 EST
In the example below, when you click on the TAnnotationTool, the TRectangleTool is selected:

uses Series, TeeTools, TeeSelectorTool;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.Legend.Hide;

  Chart1.AddSeries(TFastLineSeries).FillSampleValues;

  Chart1.Tools.Add(TSelectorTool);

  with Chart1.Tools.Add(TRectangleTool) as TRectangleTool do
  begin
    Text:='Rectangle';
    Shape.Transparency:=50;
    Shape.Color:=clYellow;
    Top:=100;
    Left:=100;
    Width:=200;
    Height:=100;
  end;

  with Chart1.Tools.Add(TAnnotationTool) as TAnnotationTool do
  begin
    Text:='Annotation';
    Shape.Transparency:=50;
    Shape.Color:=clRed;
    Shape.Shadow.Hide;
    Top:=120;
    Left:=130;
    Width:=100;
    Height:=50;
  end;
end;