Page 1 of 1
ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Sat Apr 02, 2011 8:28 am
by 15658604
Hi,
I am Working with three Panels witch are including a galleryPanel, TChart and ChartListBox.
How can i get the Index of the selected Series in an ChartListBox to use it to Change the Series.Style with the galleryPanle in VB.Net.
Thanks and Best Regards
Re: ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Mon Apr 04, 2011 10:46 am
by yeray
Hi AGF,
I'm not sure to understand how would you exactly want it to respond. It would be helpful if you could arrange a simple example project we can run as-is to reproduce the situation here.
Thanks in advance.
Re: ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Mon Apr 04, 2011 11:01 am
by 10050769
Hello AGF,
I'm not sure if this is what you are trying to do but this lines of code seems that achieve to series of index you are indicated:
Code: Select all
Dim series As Steema.TeeChart.Styles.Series
series = ChartListBox1.Items.Item(0)
if it's not what you were trying to do, please arrange the example Yeray was asking for.
I hope will helps.
Thanks,
Re: ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Mon Apr 04, 2011 11:17 am
by 15658604
What i am looking for is to get the Item() Index number of the currently at the ChartlistBox selected .Items.item()
Re: ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Tue Apr 05, 2011 9:16 am
by 10050769
Hello AGF,
I suggested that use property of ChartListBox SelectedIndex and SelectedIndexChanged Event as do in next example of code:
Code: Select all
Steema.TeeChart.Styles.Line Series1, Series2;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Series2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Series1.FillSampleValues();
Series2.FillSampleValues();
chartListBox1.Items.Add(Series1);
chartListBox1.Items.Add(Series2);
chartListBox1.SelectedIndexChanged += new EventHandler(chartListBox1_SelectedIndexChanged);
}
void chartListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int j = chartListBox1.SelectedIndex;
}
Could you tell us, if previous code help you to solve your problem?
Thanks,
Re: ChartListBox - Get Index (SeriessIndex) of active Series
Posted: Wed Apr 06, 2011 6:17 am
by 15658604
Dear Sandra,
yes it helps me to fix my problem