Rich Textboxes - VB as compared to Delphi

BhaalChild
10-05-2001, 06:40 PM
Alright, the Rich TextBox is getting me incensed. I checked the forums for information, but I found nothing. So, here's my little problem:

In Delphi, all I had to do was type the following code:

RichEdit1.Lines.Add('add text here');
RichEdit1.Lines.Add('');
RichEdit1.Lines.Add('add more text here');

The result:

add text here
/* space */
add more text here

However, in Visual Basic 6.0, I can't enter text this way. No matter what, I always get the last text input to show up and nothing else. How can I achieve the above result using Rich Textboxes in Visual Basic? I must know. Thanks

"C/C++ you say? Ha, I've got Visual Basic!" - Me

Volte
10-05-2001, 06:51 PM
RichTextBox1.SelText = "Your Text Here"

should append the text to the end.

BhaalChild
10-05-2001, 06:59 PM
Cool, it works! But do you know how to add a new line (return, carriage feed ... whatever)?

"C/C++ you say? Ha, I've got Visual Basic!" - Me

Derek Stone
10-05-2001, 07:08 PM
<pre>"MyText & vbCrLf & "MoreText"

</pre>

Good Luck
-cl

BhaalChild
10-05-2001, 07:11 PM
Yes! Thank you very much; works like a charm! Thanks guys for the help!

"C/C++ you say? Ha, I've got Visual Basic!" - Me

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum