We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 99,082 times

Contents

Related Categories

Rich Text Box Controls - Indents & Aligning

ZERO-COOL

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

I'm a 12 year old child who is interested in learning programming languages. My current two are Visual Basic and C++.

Comments

  • hi

    Posted by kailas on 17 Oct 2005

    hi redstar...

    m also facing same problem.. do u got any solution?

    with regards,

    kailas

  • arrow intendation

    Posted by sshamsudheen on 21 Apr 2005

    how to get arrow intendation

  • bullet intending

    Posted by sshamsudheen on 21 Apr 2005

    how to chane the bullet intend as arrow

  • Saving and Loading Text formats

    Posted by DanTheMan on 03 Feb 2005

    I am wondering if thier is a way to save and load text formatting using VB6, for example fonts, text colors etc. Does anybody know any easy ways round it???

  • a work around

    Posted by ulaska on 26 Aug 2003

    Try the following code as work around:

    ' flag the section with bullet mark
    rtfSectionText.SelBullet = True

    ' replace bullet with numbers
    rtfSectionText.SelRTF = Replace(rtfSectionText.SelRTF, ...