unit Unit4;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Buttons;

type

  { TRefineDataForm }

  TRefineDataForm = class(TForm)
    DelSelectedRowSpeedButton: TSpeedButton;
    procedure DelSelectedRowSpeedButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  RefineDataForm: TRefineDataForm;

implementation
Uses Unit1;
{$R *.lfm}

{ TRefineDataForm }

procedure TRefineDataForm.DelSelectedRowSpeedButtonClick(Sender: TObject);
Var I,A,B:Longint;
begin
  A:=Form1.StringGrid.Selection.Top;
  B:=Form1.StringGrid.Selection.Bottom;
  For I:=Form1.StringGrid.RowCount-1 DownTo 0 Do begin
    If (A<=I) And (I<=B) Then
      Form1.StringGrid.DeleteRow(I);
  end;

end;

end.

