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 and ParagraphStyle. These classes can be used to change the styles. TX Text Control ActiveX offers a Style object that represents a formatting style. The Styles collection represents all formatting styles a TX Text Control document contains. A common task is to access an existing style and to change…

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 and ParagraphStyle. These classes can be used to change the styles.
TX Text Control ActiveX offers a Style object that represents a formatting style. The Styles collection represents all formatting styles a TX Text Control document contains. A common task is to access an existing style and to change some attributes.
Consider a style with the name Headline. To modify this style, the Item method must be called with the name of the style. After that, the properties of the Style object can be modified. Then, the modifications and the Apply method must be used to confirm the changes. The following sample code shows this in detail.
Set style = TXTextControl1.Styles.Item("Headline")
style.FontName = "Arial"
style.FontSize = 400
style.Apply
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…
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…
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?…