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.
TeeChart fails on second ShowDialog for a form
TeeChart fails on second ShowDialog for a form
- Attachments
-
- TeeChartBug.zip
- (36.15 KiB) Downloaded 317 times
-
- 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
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:
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 |
Instructions - How to post in this forum |