Click on marks

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bob Yeatman
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

Click on marks

Post by Bob Yeatman » Fri Jan 02, 2009 2:16 pm

Hi,

I have a Teechart with a PointSeries that has an onClick event. When the user clicks on the series a dialog pops up when he/she can enter text for the marks labels. This works well but... I want the dialog pop up to be shown when the user clicks on the series marks too (the user will then be able to click on either the point series or the mark labels).
Currently, nothing happens when the user clicks on the marks (the point series OnClick event is not fired). How can I get an OnClick event for the series marks?

I have version 8.02 and use Delphi6. Thanks,
Bob

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

Post by Narcís » Mon Jan 05, 2009 10:25 am

Hi Bob,

First of all please notice that v8.04 is available at the client download area.

You can solve your problem using OnMouseDown event and marks Clicked method, for example:

Code: Select all

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var i: Integer;
begin
  i:=Series1.Marks.Clicked(X,Y);

  if i <> -1 then
  begin
    //Add your code here
  end;
end;
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

Bob Yeatman
Newbie
Newbie
Posts: 18
Joined: Fri Nov 15, 2002 12:00 am

Click on Marks

Post by Bob Yeatman » Wed Jan 07, 2009 10:56 am

Thanks! I'll update to the newest version soon :-)

Post Reply