Re: Delphi: Caption on Text label to string array?Posted by fpm on November 20, 2003 at 13:11:17: In Reply to: Caption on Text label to string array? posted by Steve Learn on November 19, 2003 at 05:11:36:
hi i try this for you procedure TForm1.Button1Click(Sender: TObject); var txt: string; i: integer; Leng: integer; MyMatrix: packed array of char; begin Leng := Length(Edit1.Text); SetLength(MyMatrix, leng); for i := 1 to leng do begin try begin MyMatrix[i] := edit1.text[i]; end; except beep; end; end; for i:= 1 to leng do begin txt := txt + MyMatrix[i]; end; label1.caption := txt; end; but i want to telle you that strings in delphi are arrays.
[ DelphiLand: free Delphi source code, tips, tutorials ] |
|