View Single Post
  #5  
Old 06-10-2023, 07:06
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Talking

Quote:
Originally Posted by Masquerade View Post
Sorry to keep asking, but now I've got a Type Mismatch for the following lines:

<button>.OnMouseDown(@CommonButtonDown);
<button>.OnMouseUp(@CommonButtonUp);

It seems that OnMouseDown/OnMouseUp are both TMouseEventF whereas CommonButtonDown/Up is a procedure. Is this the cause of the error?

Apologies for asking so much!
copy the procedure.
Code:
procedure OnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
//
end;

procedure OnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single);
begin
//
end;
Code:
TMouseEventF        = procedure(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single);
TMouseMoveEventF    = procedure(Sender: TObject; Shift: TShiftState; X, Y: Single);
TKeyEventF          = procedure(Sender: TObject; var Key: Word; var KeyChar: WideChar; Shift: TShiftState);

Last edited by hitman797; 06-10-2023 at 07:09.
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (06-10-2023)