[Solved] Custom component with drag-drop: issue on Windows lazarus / 34-Windows ---------------------------------------------------------------------- AlexTP · 2021-12-20 07:24 Can somebody please tell me what am I doing wrong? https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39515 This is affecting my main app. ---------------------------------------------------------------------- Mr.Madguy · 2021-12-20 09:58 First of all you need this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TMyPanel.DragOver(Sender, Source: TObject;X,Y: Integer; State: TDragState; var Accept: Boolean);begin  Accept := True;end;   constructor TMyPanel.Create(TheOwner: TComponent);begin  inherited Create(TheOwner);  FMouseDownPnt:= Point(-1, -1);  Cursor:= crIBeam;  OnDragOver := @DragOver;end;   Second - you need to do this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TMyPanel.UpdateCursor;begin  if Mouse.IsDragging then  begin    if ssCtrl in GetKeyShiftState then      DragCursor:= crMultiDrag    else      DragCursor:= crDrag;  end;end;  Please note, that cursor actually changes only after mouse movement. I'm not sure, if it's correct way to do things. Something is still wrong, because cursor flickers. I guess, you mix some "auto" and "manual" drag and drop functionality. ---------------------------------------------------------------------- AlexTP · 2021-12-20 10:53 You are cool! Thanks for the hint, I just added overloaded DragOver() method. And 'DragCursor:=...'. Solved!