On the chart a TRectangle tool is placed below the legend, which is aligned to the right of the chart. It's position is set as follows:
Code: Select all
RectangleToolDates->Left = Chart1->Legend->RectLegend.Left;
The print code is straightforward:
Code: Select all
TRect PrintMarginsRect;
PrintMarginsRect.Top = 5;
PrintMarginsRect.Left = 5;
PrintMarginsRect.Bottom = 5;
PrintMarginsRect.Right = 5;
if(PrinterSetupDialog1->Execute()){
Chart1->PrintProportional = false;
Chart1->PrintMargins = PrintMarginsRect;
TeePreview(this, Chart1);
Chart1->Print();
}
Thanks
Tom