?
Solved

All Memo Text in one Line

Posted on 2003-11-08
4
Medium Priority
?
235 Views
Last Modified: 2010-04-05
Hi.
I have a memo with some lines , like this :

Name : Richard Jakson
Age : 35
Adress : 5th Avenue

and i want like this

Name : Richard Jakson Age : 35 Adress : 5th Avenue

can someone help me ??? thnx a lot
0
Comment
Question by:fuscao_sp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:arjanh
ID: 9706982
var
  res : String;
  i : Integer;
begin
  res := '';
  for i := 0 to memo.lines.count - 1 do
    res := res + memo.lines[i];
end;
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 180 total points
ID: 9707038
or

procedure TForm1.Button1Click(Sender: TObject);
begin
  memo1.Text := stringReplace(memo1.text,#13#10,' ',[rfReplaceAll]);
end;

meikl ;-)
0
 
LVL 1

Expert Comment

by:JackNaif
ID: 9707262
Both those solutions will most likely work.
Both will alter the contents of your memo to be in one line.

But if memo1.wordwrap is true, you will see it on screen as many lines unless your memo1.width is big enough to fit the whole lenght of the text. If you set it to false, then the text will go beyond the edge and you will have to scroll.

However if you want to process the text in your memo  as a single line while showing it on the screen as many lines, then you should make use of memo1.text. It has all the text in one single string. It's good for many applications such as storing it in a file where you already have other contents. (If you want to put only the contents of a single TMemo in a file, you use memo1.lines.SaveToFile, and then memo1.lines.LoadFromFile to get it back).

Hope it helps:

Jack
0
 
LVL 5

Expert Comment

by:DeerBear
ID: 9714284
Hi,

Use Memo1.Lines.Text .

Cheers,

Andrew
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question