below, is the code i use for the standard listbox. it works pefectly. however, i can't seem to get it to work in the nextgrid. i search around this forum and then google for an answer, but did not find one.
var Form1: TForm1; StartingPoint : TPoint; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject) ; begin ListBox1.DragMode := dmAutomatic; end; procedure TForm1.listbox1DragDrop(Sender, Source: TObject; X, Y: Integer); var DropPosition, StartPosition: Integer; DropPoint: TPoint; begin DropPoint.X := X; DropPoint.Y := Y; with Source as TListBox do begin StartPosition := ItemAtPos(StartingPoint,True); DropPosition := ItemAtPos(DropPoint,True); Items.Move(StartPosition, DropPosition); end; end; procedure TForm1.listbox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin StartingPoint.X := X; StartingPoint.Y := Y; end; procedure TForm1.listbox1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := Source = listbox1; // <-- listbox control end;