Hi,
I hope someone will explain something very basic to me.
I've been using two ways to refer to series properties and methods.
1) Form1.Series1.xxx
2) Form1.DBChart1.Series[ 0 ].xxx
However with Delphi 2005 code completion, some properties, like 'Pointer' are available with the first approach but not with the second. I'd like to understand what the difference is.
Thanks,
Barry
Series references -need explanation
Hi Barry,
this is a normal behaviour, as for the first approach you are using "Series1" referencing directly to the Series style object you can access to all its properties and methods, but in the second approach you're just referencing to the first Series object of the Chart (without knowing which Series style is), so only the properties and methods shared to all the Series styles will be available.
If you want to refer to any Series using the second approach, you'll have to identificate which series style is, using for example :
(DBChart1.Series[0] as TPointSeries).Pointer....
Also, it exists another way to refer to the Series :
DbChart1[SeriesIndex]
this is a normal behaviour, as for the first approach you are using "Series1" referencing directly to the Series style object you can access to all its properties and methods, but in the second approach you're just referencing to the first Series object of the Chart (without knowing which Series style is), so only the properties and methods shared to all the Series styles will be available.
If you want to refer to any Series using the second approach, you'll have to identificate which series style is, using for example :
(DBChart1.Series[0] as TPointSeries).Pointer....
Also, it exists another way to refer to the Series :
DbChart1[SeriesIndex]
Pep Jorge
http://support.steema.com
http://support.steema.com
Series references -need explanation
Great, Thanks!!