Annotation mouse click fires chart mouse click FIRST
Posted: Mon Sep 21, 2009 1:50 am
I have a problem with TAnnotations. I create them on the fly and place them on a chart and give them a click property.
With MyAnnotation do
OnClick := AnnotationClick;
procedure Chart1.AnnotationClick(Sender: TAnnotationTool; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
If (Button = mbRight) then ...
All went well when mouse clicking on the annotation. I captured the right mouse button and did further processing.
However, I have now given the chart a mousedown event capturing the right mouse button for further processing.
Now when clicking on the annotation, the charts mouse click fires first. Not the annotations mouse click. The annotation click fires second. Have you any idea how I may get around this? How can I recognise the annotation has been clicked and so get the charts mouse click to disregard further processing?
With MyAnnotation do
OnClick := AnnotationClick;
procedure Chart1.AnnotationClick(Sender: TAnnotationTool; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
If (Button = mbRight) then ...
All went well when mouse clicking on the annotation. I captured the right mouse button and did further processing.
However, I have now given the chart a mousedown event capturing the right mouse button for further processing.
Now when clicking on the annotation, the charts mouse click fires first. Not the annotations mouse click. The annotation click fires second. Have you any idea how I may get around this? How can I recognise the annotation has been clicked and so get the charts mouse click to disregard further processing?