How To…Display the TeeChart Editor in Tree Mode

Question

“Is it possible to display the TeeChart editor in tree mode inside the report designer?”

Solution

Yes, this can be done by calling the TeeChart routine TeeSaveBoolOption inside the TeeEditCha unit.  Calling this routine with the TeeMsg_TreeMode key and a true value will globally set the editor to tree mode inside and out of the report designer.

Download: TeeChartTreeModeEditor.zip

Sample Delphi code:

uses
  TeeEditCha,
  EditChar;

procedure TForm1.Button1Click(Sender: TObject);
begin
  // set global option for displaying the chart editor
  // this will be used by ReportBuilder as well

  TeeSaveBoolOption(TeeMsg_TreeMode, True);

  EditChart(nil, Chart1);
  //ppReport1.Print;
end;