Page 1 of 1

Annotation Moves with Print Detail Resolution Change

Posted: Mon Jun 06, 2005 2:48 pm
by 8124568
Hi TChart

I have an Annotation set in the Top Right of my chart. When Print Detail Resolution is increased the Annotation moves to the origin.

Is there a way to lock down the Annotation so it will not move.
Or
Is there a way to remove Print Detail Resolution from the Print Preview control so users do not have this option.

Thanks

Posted: Thu Jun 16, 2005 2:49 pm
by Pep
Hi,
Is there a way to lock down the Annotation so it will not move.
Yes, it is. In order for the Annotation Tools to print in the correct position you have to define their positions relative to other TeeChart objects and not as absolute pixel positions. Unfortunately the default positions are absolute pixel positions and so can't be used to print Charts - if you want to print an Annotation Tool in the ppLeftTop position,for example, you'll have to use code similar to the following :

Code: Select all

private void button1_Click(object sender, System.EventArgs e)
{
	tChart1.Printer.Preview();
}
private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
	annotation1.Shape.CustomPosition = true;
	annotation1.Shape.Left = tChart1.Axes.Left.Position-40;
	annotation1.Shape.Top = (int)tChart1.Top;
}
Is there a way to remove Print Detail Resolution from the Print Preview control so users do not have this option.
I'm afraid there's no way to do this.