+function TDragManagerDefault.IsCanBeStartDragging(Site: TWinControl; AThreshold: Integer; X,Y:Integer): boolean;
+var
+  Threshold:integer;
+  aRect:TRect;
+begin
+  if AThreshold<=0 then
+    Threshold:=DragThreshold
+  else
+    Threshold:=AThreshold;
+  aRect := Site.ClientRect;
+  InflateRect(aRect, Threshold, Threshold);
+  if not PtInRect(aRect, Point(X, Y)) then
+    Result:=true
+  else
+    Result:=false;
+end;


1) name IsCanNNN, and even worse IsCanBeNNN. Pls rename to CanStartDragging

2) end of func: replace to Result:= not PtInRect(..);


--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to