var
Form1: TForm1;
list: TStringList;
procedure TForm1.FormCreate(Sender: TObject);
begin
label1.Caption := '';
label1.AutoSize := True;
label1.Color := clInactiveBorder;
list := TStringList.Create;
list.Add('Титры');
list.Add('Какой-то текст');
list.Add('');
list.Add('1');
list.Add('2');
list.Add('3');
list.Add('');
list.Add('4');
list.Add('5');
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
list.Free;
end;
procedure MoveTitle();
var
item: string;
begin
while (True) do
begin
if (Form1.Button1.Tag = 0) then
exit;
Form1.Label1.Caption := '';
for item in list do
begin
Form1.label1.Caption := Form1.label1.Caption + #13 + item;
end;
list.Insert(0, list[list.Count - 1]);
list.Delete(list.Count - 1);
Application.ProcessMessages;
Sleep(500);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if (button1.Tag = 0) then
begin
button1.Tag := 1;
MoveTitle;
end
else
button1.Tag := 0;
end;