TeePreviewPanel and selecting chart to change margins

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
NG
Newbie
Newbie
Posts: 9
Joined: Tue Aug 17, 2004 4:00 am

TeePreviewPanel and selecting chart to change margins

Post by NG » Mon Mar 14, 2005 11:39 pm

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.

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

Post by Pep » Thu Mar 17, 2005 7:24 pm

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;

NG
Newbie
Newbie
Posts: 9
Joined: Tue Aug 17, 2004 4:00 am

Post by NG » Mon Mar 21, 2005 1:43 pm

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.

Post Reply