OnRowMoved (Delphi)
Description
The following code displays the number of rows corresponding to how much a row was moved. To move rows in a TStringGrid, goRowMoving must be included in the Options property.
Code
procedure TForm1.StringGrid1RowMoved(Sender: TObject; FromIndex, ToIndex: Longint);
begin
Label1.Caption := IntToStr(Abs(FromIndex-ToIndex));
end;
Uses
- Vcl.Grids.TCustomDrawGrid.OnRowMoved ( fr | de | ja )