А как сделать цикл со следующим кодом?
Эта процедура делает цветную рамку вокруг компонента, в моём случае label.
Код:
procedure SetComponentBorder(c: TControl; colorr: integer);
begin
with TShape.Create(c) do begin
Parent:=c.Parent;
Top:=c.Top-1;
Left:=c.Left-1;
Pen.Color:=colorr;
Width:=c.Width+2;
Height:=c.Height+2;
SendToBack;
end;
end;
А вот здесь собственно говорю, какой компонент в какой цвет закрашивать.
Как здесь сделать цикл? //цвет один для всех, компонент только label
Код:
procedure TForm1.FormCreate(Sender: TObject);
...
begin
SetComponentBorder(Label1, 9639167);
SetComponentBorder(Label2, 9639167);
SetComponentBorder(Label3, 9639167);
SetComponentBorder(Label4, 9639167);
...