Board index » cppbuilder » how to save memo->lines into one string

how to save memo->lines into one string

Hi,

in my apllication is an memo, where the user can enter some little text. now
i want to save this into a variable of type string (String text).

does anybody know how to do?

Philipp

 

Re:how to save memo->lines into one string


Philipp says...

Quote
> does anybody know how to do?

Have you looked at the memo's Lines property?  It's a TString, which has
a Text property which maybe precisely what you want.

Alternatively, there's the CommaText property.

good luck
--
liz

Re:how to save memo->lines into one string


Use the Text property.

Gambit

Quote
"Philipp" <phil...@netserverxyz.com> wrote in message

news:3d877372@newsgroups.borland.com...
Quote
> in my apllication is an memo, where the user can
> enter some little text. now i want to save this into
> a variable of type string (String text).

Re:how to save memo->lines into one string


The Tmemo has a lines property, which in turn has a Text property, that is
what you want.  It's an Ansistring.  It still contains CR/LF's though.
Another option ti grab each "line" individually, and concatenate into one
string. using the count property of the lines property.

Quote
"Philipp" <phil...@netserverxyz.com> wrote in message

news:3d877372@newsgroups.borland.com...
| Hi,
|
| in my apllication is an memo, where the user can enter some little text.
now
| i want to save this into a variable of type string (String text).
|
| does anybody know how to do?
|
| Philipp
|
|

Re:how to save memo->lines into one string


memo has the Line property, this is a Tstrings..
 Tstrings has a Text property, that is a string that contains all of the LFCR
etc..
Quote
Philipp wrote:
> Hi,

> in my apllication is an memo, where the user can enter some little text. now
> i want to save this into a variable of type string (String text).

> does anybody know how to do?

> Philipp

Re:how to save memo->lines into one string


memo has the Line property, this is a Tstrings..
 Tstrings has a Text property, that is a string that contains all of the LFCR
etc..
Quote
Philipp wrote:
> Hi,

> in my apllication is an memo, where the user can enter some little text. now
> i want to save this into a variable of type string (String text).

> does anybody know how to do?

> Philipp

Other Threads