Question RichTextBox Formatting...

PMac

Member
Joined
Feb 17, 2012
Messages
11
Programming Experience
Beginner
I'm wondering if anyone can help me with formatting a RichTextBox. I have a large amount of text to be displayed in it, and I need it to be formatted in a way which makes it easier for the user to read (ie. Paragraphs, line breaks, etc.)

Also, I am going to be doing this for a very large amount of different texts. It's an educational program, so when the user picks different options, different texts are going to be displayed in the RichTextBox that need to be formatted much like a Word document, instead of one long line of text wrapped into a box.

Hope I was descriptive enough for all of you...
 
... Nevermind, it seems I had the answer all along, there was just a conflict in my code that I didn't notice that was preventing me from seeing my results. I've just used "vbCrLf" as a line break, and doubled it up where I wanted a paragraph break. example:

richtextbox.text = "Line 1 text" & vbCrLf & vbCrLf & "Line 2 text"

Resulting in somthing like this:

Line 1 text

Line 2 text

Not sure if that's the proper way of doing things, but It's worked alright for my purposes anyway.
 
Back
Top