Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2016, 03:14 PM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default line by line

how to copy line by line from one memo to another memo or into richedit.
Reply With Quote
  #2  
Old 08-23-2016, 03:44 PM
drama22 drama22 is offline
Senior Member
 
Join Date: Jul 2014
Posts: 202
Default

maybe you can count the lines in memo and add them one by one ?

Forget to add a brief .

fast brief

Code:
var
i : integer;
begin
for i := 0 to memo1.lines.count -1 do 
begin
othermemo.lines.add(memo1.lines[I]);
end;
end;

Last edited by drama22; 08-23-2016 at 04:00 PM.
Reply With Quote
  #3  
Old 08-24-2016, 07:19 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default

Quote:
Originally Posted by drama22 View Post
maybe you can count the lines in memo and add them one by one ?

Forget to add a brief .

fast brief

Code:
var
i : integer;
begin
for i := 0 to memo1.lines.count -1 do 
begin
othermemo.lines.add(memo1.lines[I]);
end;
end;
I know this can be done this way , is possible without looping Memo1.
Reply With Quote
  #4  
Old 08-24-2016, 07:28 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default

Your original question is:

<<how to copy line by line from one memo to another memo or into richedit.>>


And now you are asking how to copy them all once!!!

Why do you keep asking misleading questions?



Code:
Memo1.Lines.Text := Memo2.Lines.Text;
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #5  
Old 08-24-2016, 07:29 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 382
Default

Quote:
Originally Posted by Jasser View Post


And now you are asking how to copy them all once!!!
where did u see how to copy them all once!!!
Reply With Quote
  #6  
Old 08-24-2016, 08:19 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

Quote:
without looping
Without looping = all once
Reply With Quote
  #7  
Old 09-05-2016, 10:05 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

TStrings is a descendant of TPersistent and that gives you the Assign function to copy its data over to another object.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:27 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.