
18.05.2009, 13:51
|
Активный
|
|
Регистрация: 29.03.2009
Сообщения: 300
Репутация: 94
|
|
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
s: string;
Pos13: Integer;
begin
s := RichEdit1.SelText;
Pos13 := Pos(#13#10, s);
while Pos13 <> 0 do
begin
ListBox1.Items.Add(Copy(s, 1, Pos13 - 1));
Delete(s, 1, Pos13 + 1);
Pos13 := Pos(#13#10, s);
end;
if (s <> #13#10) and (s <> '') then ListBox1.Items.Add(s);
end;
|