Page 1 of 1

TeePreviewPanel and selecting chart to change margins

Posted: Mon Mar 14, 2005 11:39 pm
by 9338558
I have a TeePreviewPanel with 2 charts. Is there a way to change which chart gets the focus for margin manipulation? I am using Delphi 2005 and TeeChart Pro V7.04.

Posted: Thu Mar 17, 2005 7:24 pm
by Pep
Hi,

yes, you can use the following code :

Code: Select all

procedure TForm1.Chart1Click(Sender: TObject);
begin
  with TeePreviewPanel1 do
  begin
    Panels.clear;
    Panels.Add(Chart1);
    Panels.Add(Chart2);
    Refresh;
  end;
end;

procedure TForm1.Chart2Click(Sender: TObject);
begin
  with TeePreviewPanel1 do
  begin
    Panels.clear;
    Panels.Add(Chart2);
    Panels.Add(Chart1);
    Refresh;
  end;
end;

Posted: Mon Mar 21, 2005 1:43 pm
by 9338558
Thanks, I didn't think about putting the chart I wanted to move in the list first. Hopefully there will be better documentation in the future. I thing you have a good product. :) Thanks again for your help.