In Initialize I'm creating series of plots automatically :
string sPlotName ;
int i ;
for (i=1 ; i <10 ; i++)
{
sPlotname = "Plot" + i.ToString() ;
Add (new Plot(...... , sPlotname) ;
}
In OnBarUpdate I would like to access my plots object indirectly:
instead of :
Plot1.Set(...)
Plot2.Set(...)
.....
Plot10.Set(...)
to access them by object name in the loop:
for (i=1 ; i <10 ; i++)
{
sPlotname = "Plot" + i.ToString() ;
Plots[0].Set(...);
}
Of course this code is improper, Plots array doesn't expose its plot object. Any other way to do it ?
Thanks.
Comment