Page 1 of 1

TLegendPaletteTool exception

Posted: Wed Feb 15, 2012 11:35 pm
by 10550286
I'm using C++Builder XE with TChart v2011.04.41118.

Create a project with a chart. In the constructor put:

Code: Select all

TLegendPaletteTool* pLegendPalette = new TLegendPaletteTool(Chart1);
  pLegendPalette->ParentChart = Chart1;
And of course include the header

Code: Select all

#include <TeeLegendPalette.hpp>
Run the project. Click on the chart. You will get 'EInvalidOperation with message 'Control has no parent window'.

In the debugger you can see it is trying to run some TLegendPaletteTool ChartMouseEvent.

I think this is recently introduced - I recently upgraded from v2011.03.30407 and I don't think this was happening.

Re: TLegendPaletteTool exception

Posted: Fri Feb 17, 2012 6:33 pm
by yeray
Hi,

You are right. I've added it to the defect list to be fixed asap (TV52016042).
Thanks for reporting it.