Indents and Numbered Lists
If you use the TX Text Control ActiveX button bar to insert a numbered list, you will get a different result than when you insert a numbered list simply using the ListType property. Why is this? The button bar implements an indent that defines the position between the number character and the text. This button behavior can be easily reproduced using the IndentL and IndentFL properties. The following code reproduces this behavior exactly: Private Sub Command1_Click()…

If you use the TX Text Control ActiveX button bar to insert a numbered list, you will get a different result than when you insert a numbered list simply using the ListType property.
Why is this?
The button bar implements an indent that defines the position between the number character and the text. This button behavior can be easily reproduced using the IndentL and IndentFL properties.
The following code reproduces this behavior exactly:
Private Sub Command1_Click()
TXTextControl1.NumberingAttribute(txNumberingFormatChar) = 0
TXTextControl1.ListType = txListNumbered
TXTextControl1.IndentL = 360
TXTextControl1.IndentFL = -360
TXTextControl1.SelText = "Line 1" + Chr(11) + "Line 2"
End Sub
ActiveX
TX Text Control ActiveX is a royalty-free, fully programmable rich edit control that offers developers a broad range of word processing features in a reusable component. It provides comprehensive text formatting, powerful mail merge features and all word processing key concepts such as table support, images, headers and footers and page sections.
Related Posts
How to Get the Last Line in TX Text Control ActiveX
I have been asked today how to check, if the cursor is in the last line. Here is the resulting code snippet, which includes the extra check for the last text position in the document: Private…
FontItalic on CTRL+i with TX Text Control ActiveX
TX Text Control inserts a tab character when the key combination CTRL+i is used. This short code sample shows you how to trap these keystrokes in order to implement some other behavior, such as…
Modifying Styles in TX Text Control ActiveX
TX Text Control .NET for Windows Forms offers extensive classes to modify document styles. The FormattingStyle class is the base class for the two different supported style classes: InlineStyle…
Open Documents with an Offset
TX Text Control ActiveX offers an Offset parameter to export a document with a specific file offset position. This offset can be used to save a custom file header that could contain additional…
'Change Case' in TX Text Control ActiveX
A desirable feature of a word processing application is to change the case of a word, sentence or entire document. This sample application shows you how to implement the different cases known from…