Hello!
I'm missing the events OnMouseEnter and OnMouseLeave for the TColorLineTool.
When I right click on a TColorLineTool I want my popupmenu to activate the feature "Delete ColourLine".
Is there some other way to do this without the above events?
Regards, Mikael
Missing events in TColorLineTool
Re: Missing events in TColorLineTool
Hello,
You could use Chart's OnMouseDown event in combination with the tool Clicked function to check if the TColorLine has been clicked. For example:
You could use Chart's OnMouseDown event in combination with the tool Clicked function to check if the TColorLine has been clicked. For example:
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var i: Integer;
begin
for i:=0 to Chart1.Tools.Count-1 do
if (Chart1.Tools[i] is TColorLineTool) then
if (Chart1.Tools[i] as TColorLineTool).Clicked(X,Y) then
begin
Chart1.Tools.Remove(Chart1.Tools[i]);
Chart1.Repaint;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |