ChartListBox - Get Index (SeriessIndex) of active Series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

ChartListBox - Get Index (SeriessIndex) of active Series

Post by AGF » Sat Apr 02, 2011 8:28 am

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ChartListBox - Get Index (SeriessIndex) of active Series

Post by Yeray » Mon Apr 04, 2011 10:46 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: ChartListBox - Get Index (SeriessIndex) of active Series

Post by Sandra » Mon Apr 04, 2011 11:01 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: ChartListBox - Get Index (SeriessIndex) of active Series

Post by AGF » Mon Apr 04, 2011 11:17 am

What i am looking for is to get the Item() Index number of the currently at the ChartlistBox selected .Items.item()

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: ChartListBox - Get Index (SeriessIndex) of active Series

Post by Sandra » Tue Apr 05, 2011 9:16 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

AGF
Newbie
Newbie
Posts: 34
Joined: Mon Feb 21, 2011 12:00 am

Re: ChartListBox - Get Index (SeriessIndex) of active Series

Post by AGF » Wed Apr 06, 2011 6:17 am

Dear Sandra,

yes it helps me to fix my problem

Post Reply