I'm new to C# and I'm having a problem accessing some series properties.
This works fine where I already have a statically defined series:
private void PointsCheckBox_CheckedChanged(object sender, EventArgs e)
{
this.line1.Pointer.Visible = this.PointsCheckBox.Checked;
}
Later during execution, I add some more series to the chart. I would like to set the property as above, Pointer.Visible, but it's not available:
private void PointsCheckBox_CheckedChanged(object sender, EventArgs e)
{
foreach (int i in this.theLargeChart.Series)
{
this.theLargeChart.Series.Pointer.Visible = this.PointsCheckBox.Checked;
} ................................^^^^^^^This property is not visible here.
}
Could someone show me how I can access that property?
Thanks,
Brian
Need help accessing properties.
Re: Need help accessing properties.
Hello Brian,
Your problem is produced because, not all series have the pointer property. For this reason to access pointer property, you must define the type of series as you are using as do in next line of code:
Could you tell us if previous code works in your end?
Thanks,
Your problem is produced because, not all series have the pointer property. For this reason to access pointer property, you must define the type of series as you are using as do in next line of code:
Code: Select all
(Chart1.Series[i] as Steema.TeeChart.Styles.Line).Pointer.Visible= true;
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Need help accessing properties.
Thank you Sandra, that was exactly what I needed.
Brian
Brian
Re: Need help accessing properties.
Hello Brian,
I am glad that suggestion helps you .
Thanks,
I am glad that suggestion helps you .
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |