I'm trying to set various properties of CAnnotationTool via my code.
1) What property do I use to set the Custom Position on/off and also the Left and Top values of the Custom Position?
I'm using TChart V7 and Visual C++ 9.0
Thanks.
CAnnotationTool Custom Position
Hi nbp,
To place your annotation in one of the predefined positions of your chart, you could use one of the following sentences:
And to place it in a custom position, for example:
To place your annotation in one of the predefined positions of your chart, you could use one of the following sentences:
Code: Select all
TChart1.Tools.Items(0).asAnnotation.Position = ppCenter
TChart1.Tools.Items(0).asAnnotation.Position = ppLeftBottom
TChart1.Tools.Items(0).asAnnotation.Position = ppLeftTop
TChart1.Tools.Items(0).asAnnotation.Position = ppRightBottom
TChart1.Tools.Items(0).asAnnotation.Position = ppRightTop
Code: Select all
TChart1.Tools.Items(0).asAnnotation.PositionUnits = puPixels
TChart1.Tools.Items(0).asAnnotation.Left = 200
TChart1.Tools.Items(0).asAnnotation.Top = 300
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Hi nbp,
The boolean you are looking for:
Are you sure that you have the latest v7 available? Here with TeeChart v7.0.1.4 I can use:
or also:
The boolean you are looking for:
Code: Select all
TChart1.Tools.Items(0).asAnnotation.Shape.CustomPosition = True
Code: Select all
TChart1.Tools.Items(0).asAnnotation.Left = 20
TChart1.Tools.Items(0).asAnnotation.Top = 50
Code: Select all
TChart1.Tools.Items(0).asAnnotation.Shape.Left = 20
TChart1.Tools.Items(0).asAnnotation.Shape.Top = 50
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |