Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with richedit box

Status
Not open for further replies.

minckle

Programmer
Mar 17, 2004
142
0
0
GB
How do i programatically add carriage returns to a richedit box??

Basically i want add to couple lines of text sepearted by a 'returns'

richedit1.text := richedit1.text + //something to add a
carriage return
richedit1.text := richedit1.text + 'line 1'
richedit1.text := richedit1.text + //something to add a
carriage return
richedit1.text := richedit1.text + 'line 2'


thanks

 
richedit1.text := richedit1.text + chr(13)
or
richedit1.text := richedit1.text + #13

But be careful the results are not always what you might expect. You may have to build your strings in a string variable then insert them that sort of thing, its worth experimenting a bit.




Steve: Delphi a feersum engin indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top