If line breaks are displayed in memo, they will be displayed in TRichView too.
Demo: http://www.trichview.com/support/files/Memo2RV.zip
How to add a new line when #13
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 49
- Joined: Thu Jan 03, 2008 6:11 pm
- Location: South-Africa
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
If you have such string in s, you can replace '#13#10' to line break characters #13#10 using this procedure (it is not very efficient, but it works):
But this is a bad solution. A good solution is inserting line breaks characters in the first place.
Can you post the code where you add '#13#10' when the user presses Enter?
Code: Select all
var p: Integer;
p := Pos('#13#10', s);
while p>0 do begin
Delete(s, p, 6);
Insert(#13#10, s, p);
p := Pos('#13#10', s);
end;
Can you post the code where you add '#13#10' when the user presses Enter?
-
- Posts: 49
- Joined: Thu Jan 03, 2008 6:11 pm
- Location: South-Africa
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Change
to
(remove quotes)
Code: Select all
AKey:= '#13#10';
Code: Select all
AKey:= #13#10;