Re: Delphi: Caption on Text label to string array?


[ Delphi Forum -- by DelphiLand ]

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
there is one Tlabel and Tedit and Tbutton

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.
if you need some help contact me ..
good luck

   
 

Related Articles and Replies:


[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]