new line in editor

I am filling in an editor field from an external file and would like to know how to (if it is possible) tell the editor when to start a new line.

eg:

At the moment the editor field is filled out as one line like this:

hello my name is Andrew

I would like the following result:

hello my
name is
Andrew

Can anyone help?


Andrew Price
 

NickA

Member
Word wrap?

Are you referring to word wrap, or is this something more complex?

If we're just talking word wrap, look in the language help for the WORD-WRAP and SCROLLBAR-HORIZONTAL attributes relating to editor widgets.
 
Thanks for the responses so far

Thanks for the responses so far. I have tried these solutions but unfortunately no joy. I will try and explain what I am trying to do more clearly.

I take a file called liste. and insert th contents of this file into a table called. P_Info with the fields Nummer and Beschreibung.

The field Beschreibung is then output to an editor in the GUI.

I would like to put the data into the editor in a preformated way as previously described such as:

My name
is Andrew

I know that if I edit the editor field in the GUI and save it then the editing is also saved in the field Beschreibung. What I would like to do is upload the data from liste so that the field is properly formated.

I have tried writing the following data into the file liste:

My name ~n is Andrew
My name '~n' is Andrew
My name ~012 is Andrew

These solutions don't work. Any other ideas?

Regards

Andrew
 

NickA

Member
Andrew

There are two ways I can think of to get around this off the top of my head:

1) Use the REPLACE function to replace your own delimiter with '~n' _after_ you've imported the string.

EG of REPLACE function..
Code:
ASSIGN cBeschreibung = REPLACE ( cBeschreibung, "[I]delimiter[/I]", "~n" ).

2) Format your import file differently. The Progress default for ASCII file import/export character strings is to put them in quotes. If you physically put new line into 'beschreibung' in your ASCII file without terminating the string with the trailing quote, it should work ok.

EG of ASCII file..
Code:
"1" "My name
is andrew"
"2" "My
name is andrew"

I know the above looks odd, and most applications would cough trying to import it, but Progress copes OK.
 
Thanks Nick

Thanks Nick I used the following solution:

ASSIGN cBeschreibung = REPLACE (cBeschreibung, "delimiter", "~n" ).

This worked great.

Andrew
 
Top