also nochmal manuell, sollte aso in der
clx funktionieren:
Delphi-Quellcode:
{ Private-Deklarationen }
fDragging:boolean;
fRelPos:TPoint;
...
procedure TForm1.PanelMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
fDragging:=true;
fRelPos:=Point(x,y);
(sender as TPanel).Cursor:=crCross;
end;
procedure TForm1.PanelMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
fDragging:=false;
(sender as TPanel).Cursor:=crDefault;
end;
procedure TForm1.PanelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if fDragging then
begin
(sender as TPanel).left:=panel1.left+X-fRelPos.x;
(sender as TPanel).top:=panel1.top+Y-fRelPos.y;
end;
end;
HTH Frank