var s:string; ts:TStringList; i,j:integer; begin s:='123,456,78,a,b,c'; ts:=TStringList.Create; while Pos(',',s)>0 do begin j:=POS(',',s); ts.Add(Copy(s,1,j-1)); Delete(s,1,j); end; ts.Add(s); for i:=0 to ts.Count-1 do TEdit(self.FindComponent('Edit'+IntToStr(i+1))).Text:=ts[i]; ts.Free;
edit2.Text:=copy(s,5,3);
edit3.Text:=copy(s,9,2);
.....
s:string;
ts:TStringList;
i,j:integer;
begin
s:='123,456,78,a,b,c';
ts:=TStringList.Create;
while Pos(',',s)>0 do
begin
j:=POS(',',s);
ts.Add(Copy(s,1,j-1));
Delete(s,1,j);
end;
ts.Add(s);
for i:=0 to ts.Count-1 do
TEdit(self.FindComponent('Edit'+IntToStr(i+1))).Text:=ts[i];
ts.Free;