What is the character textarea insert after end of the line to go to the next line

Use the EndOfLine constant

textarea1.text = “some text” + endofline + “next line” + endofline + “third line”

Hi Bob

When you type what chr text area insert by it self


It’s different between systems, so it’s a built in Xojo constant. Do not use chr().

Isn’t chr(13) or chr$(13) the ASCII standard for ‘Enter’ or return

chr(4) = Enter chr(13) = Return

[quote=182778:@Emile Schwarz]chr(4) = Enter
chr(13) = Return[/quote]

Chr(4)=EOT end of transmission. Not ENTER

No. It is “Carriage Return” from a time when type writers moved left and right. Moving the carriage did not necessarily mean making a new line (although often you did both actions in one go).

I recommend you follow the link Tim provided.

Chris, that was on the Apple II thirty years ago.

Today the standard Return in Windows is chr(13)+chr(10). Within a TextArea, the character that makes a Return is Chr(10) in Windows and Chr(13) in Mac. Possibly something else in Linux.

Use EndOfLIne and you will be fine. Let the system pick what is good for it.

Linux is “the other one” to the Mac - so chr(10). Windows is H"0D0A" - chr(13)+chr(10). It takes me back to the old days of controlling matrix printers - CR LF LOL.

Historically, the chr(13)+chr(10) combination was for teletypes and similar machines. The Chr(13) was the carriage return and the Chr(10) was the line feed. By judicious use of them the printing machine, or card punch, or whatever with a moving carriage, could access any point on the material. The characters needed to be separate since options like BOLD were done by reprinting the line and re-inking the specified word(s).

DOS, and later Windows, adopted it in order to work properly with the IBM mainframe peripherals and the IBM PC.

Because I wanted to work with the Text data type and not a String, I found this in the Dev Center:

[quote]Get the EndOfLine character:

Dim EOL As Text = Text.FromUnicodeCodepoint(10)

This works great.

I used the following:

Dim EOL As Text = Text.FromUnicodeCodepoint(10) Dim MyText As Text MyText = "First line" + EOL + "Second Line"

You could also create a Text constant EOL = &u0A