TeeChart problems in VS2005 with v3 and tabs

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Retail Dev
Newbie
Newbie
Posts: 2
Joined: Mon Sep 10, 2001 4:00 am
Contact:

TeeChart problems in VS2005 with v3 and tabs

Post by Retail Dev » Fri Oct 12, 2007 9:35 pm

I'm working with VS2005 and v3 and having a problem with a teechart on a tab control. If the chart is on the first tab, things work fine. However, if the chart is on the 2nd tab, I get an 'Object reference not set to an instance of an object.' when trying to close the form. The error occurs when the form tries to dispose of the chart. If you click on the tab that contains the chart, things work fine when closing, but if you don't click on the tab with the chart, you get the error.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 15, 2007 8:16 am

Hi Retail Dev,

Thanks for reporting. I've been able to reproduce this running and closing the application without opening the tab where the chart is. Can you confirm this is the same problem you see? Anyway, I've added it (TF02012518) to our defect list to be fixed for future releases.

Thanks in advance!
Best Regards,
Narcís Calvet / 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

Retail Dev
Newbie
Newbie
Posts: 2
Joined: Mon Sep 10, 2001 4:00 am
Contact:

Post by Retail Dev » Mon Oct 15, 2007 1:48 pm

Yes, this is the same problem. Is there anything you know of that we can do to get around this problem for the time being? And thank you for your help.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 15, 2007 2:33 pm

Hi Retail Dev,

The only workaround I can think of at the moment is setting the SelectedTab to be the chart's tab when the application starts and as soon as the chart has been painted set SelectedTab to the initial tab in the chart's AfterDraw event, for example:

Code: Select all

		private void Form1_Load(object sender, EventArgs e)
		{
			tabControl1.SelectedTab = tabPage2;
		}

		private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			tabControl1.SelectedTab = tabPage1;
		}
Hope this helps!
Best Regards,
Narcís Calvet / 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

Post Reply