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
Rich Text Box Controls
- Introduction
- Basic Formatting
- Inserting text
- Indents & Aligning
- Colors, bullets & superscript
Indents & Aligning
You might also like...
About the author
ZERO-COOL
I'm a 12 year old child who is interested in learning programming languages. My current two are Visual Basic and C++.
Interested in writing for us? Find out more.
VB 6 books
-
Programming with Microsoft Visual Basic 2008
Programming with Microsoft Visual Basic 2008, Fourth Edition by the best-selling author, Diane Zak, is designed for a first course in programming. Using the most recent version of the software, Visual Basic 2008, this book teaches individuals how to ...
VB 6 forum discussion
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
client/server application using activex
by beautifulheart (0 replies)
-
System Error &H8007007E. The specifed module could not be found.
by swiftsafe (5 replies)
-
Invitation to take part in an academic research study
by researchlab (0 replies)
-
Send SMS with SMPP
by mmahmoud (0 replies)
VB 6 podcasts
-
Stack Overflow Podcast: Podcast #45 – Keeping it Sharp
Published 7 years ago, running time 0h54m
Our guest this week is Eric Lippert – language architect extraordinaire and famous for all his work at Microsoft in developing their languages Eric joined Microsoft right out of college and was originally working on VB It’s time for everyone’s favorite game: Name the Worst Feature of that Microso.
Comments