Page 1 of 1

Click on marks

Posted: Fri Jan 02, 2009 2:16 pm
by 5886715
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

Posted: Mon Jan 05, 2009 10:25 am
by narcis
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;

Click on Marks

Posted: Wed Jan 07, 2009 10:56 am
by 5886715
Thanks! I'll update to the newest version soon :-)