Apart from making text bold, underlined, italic or strikethrough
you can also use bullets, tab stops and left and right indents. Of these, tab
stops are the most complicated and will be covered in another section. Note:
For any of these examples, set the Scale Mode property on the Form that the
text box is contained to Millimetres, or adjust the values shown in any examples
on this page.
Statement | Action |
RichTextBox1.SelBullet = True | Makes the selected text bulleted |
RichTextBox1.BulletIndent = 10 | Sets the distance between the bullet and the text to 10 (applies to all) |
RichTextBox1.RightMargin = 100 | Sets the right margin of all the text in the Rich Text Box to 100. |
RichTextBox1.SelRightIndent = 100 | Sets the right indent of all the selected text in the Rich Text Box to 100 (measured from the left). |
RichTextBox1.SelIndent = 100 | Sets the selected text left indent to 100 |
So, the following code will set make the selected text bulleted, indents by 10 mm and sets the right margin to 100 mm
' Set the forms scale mode
Me.ScaleMode = vbMillimeters
' Set the bullet
RichTextBox1.SelBullet = True
' Set the indent
RichTextBox1.SelIndent = 10
' Set the right margin
RichTextBox1.RightMargin = 100
Comments