Page 1 of 1

Problem with OnClickPointer event

Posted: Fri Nov 17, 2006 7:17 pm
by 9336044
Hi,

I am creating a TLineSeries with visible points. I need for the user to be able to click on any one of the points in the series and display detailed information about what the point represents. I thought I could simply add code to the OnClickPointer event - WRONG!

Whenever I add code to the OnClickPointer event for this series, Delphi raises the following exception when I run the program:
"Project Project1.exe raised exception class EReadError with message 'Property OnClickPointer does not exist'. Process stopped. Use Step or Run to continue."

Any idea why this is happening? I examined the code and everything *looks* ok.

I am using Delphi 6 Enterprise with TeeChart Pro 7.07.

Thanks in advance.

Rich

Posted: Mon Nov 20, 2006 9:24 am
by narcis
Hi rackerson,

This is because in v7 TLineSeries doesn't have the OnClickPointer event. However we have added it in TeeChart v8 VCL which is the version we are currently working ing.

Posted: Mon Nov 20, 2006 5:42 pm
by 9336044
Hi Narcis,

Thanks for the quick reply but I am afraid I don't quite understand the answer. If you look at the following screen shot below, you will see that when I create a TLineSeries, it DOES have an OnClickPointer event. I am not running the version 8 beta, I only have version 7.07 installed.

Image

Rich

Posted: Tue Nov 21, 2006 9:51 am
by narcis
Hi Rich,

We have checked this and the event isn't public for v7 but exists. It can be used like this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.OnClickPointer:=Series2ClickPointer;
end;

procedure TForm1.Series2ClickPointer(Sender: TCustomSeries; ValueIndex, X,
  Y: Integer);
begin
showmessage('xx');
end;

Posted: Tue Nov 21, 2006 4:00 pm
by 9336044
Ah okay. I should have thought of trying that.

Thanks!