1 (edited by prahousefamily 2016-06-22 02:44:28)

Topic: How To Read Text In Line 1,2,3 And Display Value

How To Read Text  In Memo1

LINE1='AAAAA'
LINE2='BBBBB'
LINE3='CCCCC'

and display LINE 1 to text1.text

AAAAA

and display count character Line 1 to text2.text

13

and display count all line in Memo1 to text3.text

3

Help Me please !

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How To Read Text In Line 1,2,3 And Display Value

Hello,

var
   Line1: string;
   Line2: string;
   Line3: string;
begin
   // How To Read Text  In Memo1
   Line1 := Form1.Memo1.Lines[0];
   Line2 := Form1.Memo1.Lines[1];
   Line3 := Form1.Memo1.Lines[2];

   // display LINE 1 to text1.text
   Form1.Edit1.Text := Line1;

   // display count character Line 1 to text2.text
   Form1.Edit2.Value := Length(Line1);
  
   // display count all line in Memo1 to text3.text
   Form1.Edit3.Value := Form1.Memo1.Lines.Count;
Dmitry.