Indents & Aligning
There are 3 different indents: SelHangingIndent, Indent, RightIndent. The
SelHangingIndent is how much of an indent there is on the lines after the first.
Indent is how much space there is before the first line of a paragraph. RightIndent
is the indent of the right side. These are all adjested with a number that
using the same scale at the width, heighth, top, and left (not pixels.
Object.SelHangingIndent = Number
Object.SelIndent = Number
Object.SelRightIndent = Number
'RichTextBox1 displays:
'Hi,
'Bye
RichTextBox1.SelHangingIndent = 100
RichTextBox1.SelIndent = 200
'RichTextBox1 now displays:
' Hi,
' Bye
The right indent just stops the text from the right side, but I didn't want to
get too complicated. Setting the alignment for a single line is just like
setting the alignment for a whole textbox.
Object.SelAlignment = Number
The alignment numbers are the same for a regular textbox: 0 - Left Alignment,
1 - Right Alignment, 2 - Center Alignment.
'RichTextBox1 display:
'Hello
RichTextBox1.SelAlignment = 2
'RichTextBox1 now display:
' Hello