var s: string;i:integer; begin setlength(s,6); for i:=1 to 6 do begin if TLabel(FindComponent('label' + IntToStr(i))).Caption[1] = '_' then s[i]:=' ' else s[i]:=TLabel(FindComponent('label' + IntToStr(i))).Caption[1]; end; edit1.Text:= s;