TeeChart fails on second ShowDialog for a form

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Serafim
Newbie
Newbie
Posts: 1
Joined: Fri Mar 02, 2007 12:00 am

TeeChart fails on second ShowDialog for a form

Post by Serafim » Mon Jun 24, 2013 6:07 am

We have a complex modal dialog containing TeeChart controls. As the user interacts with the dialog they may change various chart settings then close the dialog. Later, they would like to return to the dialog looking at a different dataset, but with the same display settings. We achieve this by retaining a handle to the dialog and calling ShowDialog again.

This technique should work and did work way back with TeeChart v2. However, with more recent versions of TeeChart, we just see a big red X for the chart the second time it is displayed.

I have uploaded a simple example that demonstrates the issue. You'll notice that the form containing the chart is retained including values set programmatically. The problem seems to be specific to the TeeChart control. You can also see that even if I mess with the Closing event to suppress the call to Close, the TeeChart still does not redisplay correctly.
Attachments
TeeChartBug.zip
(36.15 KiB) Downloaded 312 times

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

Re: TeeChart fails on second ShowDialog for a form

Post by Narcís » Tue Jun 25, 2013 8:24 am

Hi Serafim,

The problem is with the Graphics3D.BufferStyle property when set to BufferStyle.OptimizedBuffer. This functionality was implemented in v3. We will try to fix the issue (TF02016614) for future releases. In the meantime, a workaround is changing BufferStyle at chart creation, for example:

Code: Select all

            tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.DoubleBuffer;
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