unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    ListBox1: TListBox;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
  Listbox1.Clear;
  Listbox1.Items:=Memo1.Lines;
  Listbox1.Sorted:=true;
  Memo1.Clear;
  Memo1.Lines:=Listbox1.Items;
  Listbox1.Clear;
end;

end.
