Page 1 of 1

How can I acces the flag "Show Page Number" ?

Posted: Wed Apr 25, 2007 2:34 pm
by 9232434
Hello,

how can I access the flag "Show Page Number".
I want to set/clear dynamic the page number.


Chart1 : TChart;

Chart1.Pages. ..........

Thanks

Reg Klaus

Posted: Wed Apr 25, 2007 2:54 pm
by narcis
Hi Klaus,

To do that you need to add TeeTools unit in your uses section and use a TPageNumTool as shown below. Then you can make the tool active or not.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var PageNum: TPageNumTool;
begin
  PageNum:=TPageNumTool.Create(self);
  Chart1.Tools.Add(PageNum);
  PageNum.Active:=true;
end;
When checking the "Show page number" checkbox at design-time the chart editor automatically creates the tool. So in that case you would only need to do that:

Code: Select all

  ChartTool1.Active:=true;