[Solved] Put annotations over drawlines

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[Solved] Put annotations over drawlines

Post by bertrod » Wed Mar 29, 2006 9:09 am

Hello,

Is it possible to set the "Z-position" of the different components of the chart ?

For instance : When I put an annotation and a drawline on the same place, the drawline is not hidden by the annotation, which is a bit annoying. Can I tell the drawline to be "behind" the annotation ?
Last edited by bertrod on Mon Apr 10, 2006 7:32 am, edited 1 time in total.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Apr 03, 2006 10:10 am

Hi,

using the following code, the line draws behind the Annotation tool :

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.tools.Add(TDrawLineTool.Create(Chart1));
end;

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  with (Chart1.Tools.Add(TAnnotationTool.Create(Chart1)) as TAnnotationTool) do
  begin
    ParentChart := Chart1;
    Text := 'xxxx';
    Shape.CustomPosition := True;
    Position := ppLeftTop;
    Shape.Left := x;
    shape.Top:=y;
  end;
end;

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Tue Apr 04, 2006 12:12 pm

Thanks, it works.

Post Reply