Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2087 - Loosing axis OnClick event after calling TeeCreateMetafile
Summary: Loosing axis OnClick event after calling TeeCreateMetafile
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 24.180321
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: yeray alonso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-15 03:03 EDT by John Ioannides
Modified: 2022-09-16 09:34 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version: RAD 10.2 Tokyo


Attachments
Sample application to recreate the issue (4.89 KB, application/x-zip-compressed)
2018-09-15 03:03 EDT, John Ioannides
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Ioannides 2018-09-15 03:03:45 EDT
Created attachment 856 [details]
Sample application to recreate the issue

Attached you can find a sample app, first click on any axis and the onclick event fires, then click on the Click me button and try to click on any axis, the onclick event does not fire
Comment 1 yeray alonso 2018-09-18 04:12:54 EDT
I can't zoom or scroll, so all the events seem to be lost after calling TeeCreateMetafile.

Worked fine in v8.08.
Reproduced in v2012.07,... and v2018.25.
Comment 2 John Ioannides 2018-09-18 04:17:05 EDT
If you add a refresh command for the chart after TeeCreateMetafile it seems to be working
Comment 3 yeray alonso 2018-09-18 04:34:31 EDT
Thanks for noticing the workaround.

Closing the gap... I could reproduce it in v2010.01. So the change should be between v8.08 and v2010.01.
Comment 4 yeray alonso 2022-09-16 09:34:33 EDT
When drawing the chart to a metafile with a different size, the internal properties (ie axis positions) are recalculated.

We introduced a condition in v2010.01 to avoid redrawing the chart if BufferedDisplay was set to true, which is the default value.
Then, since the chart isn't redrawn with it's original size, some of its internal properties are refreshed and methods like axis Clicked don't work as expected.

I'm adding an internal variable to store the value of BufferedDisplay, and I'm setting to to True when drawing a metafile (and restoring it afterwards) to force the chart to be redrawn after creating the metafile.