Hi, i have a little problem with setting the OnMouseDown event of a TImage created at runtime.
---
The procedure itself:
procedure TForm1.ImageMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
begin
end;
The code to set the event of the Timage:
E[Counter].Image.OnMouseDown:= @Form1.MouseDown;
And at last the part where the procedure is defined
procedure ImageMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
I get the error "unit1.pas(90,40) Error: Incompatible types: got "<procedure variable type of procedure(TMouseButton, TShiftState, LongInt, LongInt) of object;Register>" expected "<procedure variable type of procedure(TObject, TMouseButton, TShiftState, LongInt, LongInt) of object;Register>"
" in the message window.
What have i done wrong.
Windows XP
Lazarus: 0.9.28.2 Beta
FPC: 2.2.4
Can someone help me.
Thanks!
