TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
Fang
- Newbie
- Posts: 17
- Joined: Wed May 18, 2005 4:00 am
- Location: Johns Hopkins University
Post
by Fang » Sun Jun 05, 2005 8:57 pm
Hi,
I created a series, and changed its series type at runtime, but the selectindex of ChartListBox is lost and reset to -1 afterwards. Is this a known bug? or supposed to be?
Code: Select all
chart.Series.Clear();
Steema.TeeChart.Styles.Series s0=chart.Series.Add(typeof(Steema.TeeChart.Styles.Points));
Steema.TeeChart.Styles.Series.ChangeType(ref s0,
typeof(Steema.TeeChart.Styles.Line));
Assert.AreEqual(ChartListBox.SelectedIndex,0);
Best regards
Fang
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Mon Jun 06, 2005 1:43 pm
Hi Fang,
It works fine here using the code above and latest available version.
Code: Select all
private void chartListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
chart.Header.Text=this.chartListBox1.SelectedIndex.ToString();
}
Which TeeChart version are you using? If you are still having problems please send us an example we can run "as-is" to reproduce the problem here.
You can post your examples at [url]news://
www.steema.net/steema.public.attachments[/url] newsgroup.
Last edited by
Narcís on Wed Jun 08, 2005 11:25 am, edited 1 time in total.
-
Fang
- Newbie
- Posts: 17
- Joined: Wed May 18, 2005 4:00 am
- Location: Johns Hopkins University
Post
by Fang » Tue Jun 07, 2005 7:53 pm
I used the same version in the download section.
But I created the chart and chartlistbox in the library class(not visually), not sure if it's related.
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Wed Jun 08, 2005 11:27 am
Hi Fang,
Could you please send us a complede complete example (form or project) we can run "as-is" to reproduce the problem here?
You can post it at the newsgroup I mentioned in my previous post.
Thanks in advance.
-
Fang
- Newbie
- Posts: 17
- Joined: Wed May 18, 2005 4:00 am
- Location: Johns Hopkins University
Post
by Fang » Thu Jun 09, 2005 6:03 pm
i just upload the attachment.
two project, one class libray, one app. You might need to relink the class library from app
Fang
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Fri Jun 10, 2005 11:03 am
Hi Fang,
Thank you very much for the example project.
the code above (with
m_ChartListBox.FillSeries(null)) works:
Code: Select all
public void TEST_HERE()
{
Steema.TeeChart.Styles.Series s=
this.Series.Add(typeof(Steema.TeeChart.Styles.Points));
int i=m_ChartListBox.SelectedIndex; // should be zero
Steema.TeeChart.Styles.Series.ChangeType(ref s,
typeof(Steema.TeeChart.Styles.Line));
m_ChartListBox.FillSeries(null);
int j=m_ChartListBox.SelectedIndex; // should be zero
}