What's New in TX Text Control ActiveX 14.0
Sections came to TX Text Control ActiveX in version 14.0: one document can now mix page sizes, margins, orientations and headers and footers. The version also added the WordprocessingML format (.docx), the import and export of Microsoft Word and Heiler HighEdit fields, and printing on top of your own page content.
Because page settings now belong to a section, code written for earlier versions can behave differently. The update notes near the end list what to check when you upgrade from version 13.0.
New Features
Section formatting. A document can be split into several sections, so that it has different page sizes and margins and different headers and footers. Users set them in the new Page Setup dialog box, which the SectionFormatDialog method opens. All section attributes and all headers and footers can be set either for a single section or for the complete document.
Sections in code. The new SectionCurrent property specifies the part of the document whose section attributes your code changes. Use it together with the PageWidth, PageHeight, PageMarginL, PageMarginT, PageMarginR and PageMarginB properties.
Sections in the status bar. The TXStatusBar control shows the number of the section at the text input position, the number of pages and the number of sections in the document.

Headers and footers. The content and the alignment of headers and footers can differ for each section, and each section can have a special header and footer for its first page. A section that does not need a header or footer of its own can connect it with the header or footer of the previous section; the HeaderFooterConnectedToPrevious property does this. The SectionCurrent property together with all header and footer properties and methods changes the headers and footers of a single section or of the current input section.
WordprocessingML format. TX Text Control supports WordprocessingML, the part of the Microsoft Office Open XML format for word processing. It is a ZIP-compressed XML format and the standard format of Microsoft Word.
TXTextControlloads and saves files with the extension .docx, and blocks of memory, in this format. The Format parameter of the Load and Save methods accepts a new value for it.Import and export of Microsoft Word fields. TX Text Control imports and exports the Microsoft Word fields of Microsoft Word and RTF documents. For a field of the type txFieldMSWord, the FieldTypeData property returns its arguments and switches. This field type only provides an interface to retrieve and change the data and parameters of such fields; the field logic itself is not implemented. Before loading a document, set the txLoadMSWordFields attribute of the LoadSaveAttribute property to true. The txMSWordFieldTypeNames attribute selects particular types of fields. The FieldNext method was extended to iterate through all such fields in the document.
Import and export of Heiler HighEdit fields. TX Text Control imports and exports the Heiler HighEdit fields of RTF documents. For a field of the type txFieldHighEdit, the FieldTypeData property returns its name. Before loading a document, set the txLoadHighEditFields attribute of the LoadSaveAttribute property to true. The FieldNext method iterates through all such fields in the document.
Background printing. Additional content such as images or watermarks can be printed on a page. A TXTextControl prints transparently on top of the output that your application adds before it calls the PrintPage method.
New Properties, Methods and Events
Properties
| Member | Description |
|---|---|
| TXStatusBar.ShowColumn | Specifies whether the status bar shows the column number of the current text input position. |
| TXStatusBar.ShowLine | Specifies whether the status bar shows the line number of the current text input position. |
| TXStatusBar.ShowPage | Specifies whether the status bar shows the page number of the current text input position. |
| TXStatusBar.ShowPageCounter | Specifies whether the status bar shows the number of pages in the document. |
| TXStatusBar.ShowSection | Specifies whether the status bar shows the section number of the current text input position. |
| TXStatusBar.ShowSectionCounter | Specifies whether the status bar shows the number of sections in the document. |
| TXStatusBar.TextPageCounter | Returns or sets the text that appears in front of the page counter. |
| TXStatusBar.TextSection | Returns or sets the text that appears in the Section field in front of the section number. |
| TXStatusBar.TextSectionCounter | Returns or sets the text that appears in front of the section counter. |
| TXTextControl.HeaderFooterConnectedToPrevious | Returns or sets a value specifying whether a header or footer is connected with the header or footer of the previous section. |
| TXTextControl.PageOrientation | Returns or sets the page orientation, portrait or landscape. |
| TXTextControl.PageViewStyle | Defines the kind of view that displays the page background. |
| TXTextControl.SectionAtInputPos | Returns the number of the section that contains the current text input position. |
| TXTextControl.SectionBreakKind | Returns or sets the kind of section break the section starts with. |
| TXTextControl.SectionCount | Returns the number of sections in the document. |
| TXTextControl.SectionCurrent | Returns or sets the section number for the following properties and methods: PageWidth, PageHeight, PageMarginL, PageMarginT, PageMarginR, PageMarginB, PageOrientation, HeaderFooter, HeaderFooterActivate, HeaderFooterSelect, HeaderFooterPosition, HeaderFooterConnectedToPrevious, Columns, PageBorderAttribute, ColumnDistance, ColumnLineWidth, ColumnLineColor, ColumnWidthsAndDistances, SectionRestartPageNumbering and SectionBreakKind. |
Methods
| Member | Description |
|---|---|
| TXTextControl.SectionFormatDialog | Opens the built-in dialog box that sets page settings and designs the headers and footers, for the whole document or for a single section. |
| TXTextControl.SectionInsert | Inserts a section break at the text input position or at a specified position. |
Events
| Member | Description |
|---|---|
| TXTextControl.PageChanged | Occurs when the text input position has moved to another page. |
| TXTextControl.SectionChanged | Occurs when the text input position has moved to another section. |
Extended Properties, Methods and Events
Most of the extensions let a member work on one section, which the SectionCurrent property specifies.
Properties
| Member | Change |
|---|---|
| HeaderFooter property | Extended to support sections. SectionCurrent specifies a section number. |
| HeaderFooterPosition property | Extended to support sections. SectionCurrent determines the section that the header or footer belongs to. |
| HeaderFooterAtInputPos property | Extended to support sections. SectionCurrent receives the number of the section that the header or footer belongs to. |
| PageHeight property | Extended to support sections. SectionCurrent specifies a section number. |
| PageMarginL property | Extended to support sections. SectionCurrent specifies a section number. |
| PageMarginT property | Extended to support sections. SectionCurrent specifies a section number. |
| PageMarginR property | Extended to support sections. SectionCurrent specifies a section number. |
| PageMarginB property | Extended to support sections. SectionCurrent specifies a section number. |
| PageWidth property | Extended to support sections. SectionCurrent specifies a section number. |
| LoadSaveAttribute property | Extended with the txLoadMSWordFields and txLoadHighEditFields attributes, which support the Microsoft Word and Heiler HighEdit fields of Microsoft Word and RTF documents. |
| FieldType property | Extended with the txFieldMSWord and txFieldHighEdit field types, which support the Microsoft Word and Heiler HighEdit fields of Microsoft Word and RTF documents. |
| FieldTypeData property | Extended with the txFieldMSWord and txFieldHighEdit field types, which support the Microsoft Word and Heiler HighEdit fields of Microsoft Word and RTF documents. |
Methods
| Member | Change |
|---|---|
| HeaderFooterActivate method | Extended to support sections. SectionCurrent determines the section whose header or footer is activated. |
| HeaderFooterSelect method | Extended to support sections. SectionCurrent determines the section whose header or footer is selected. |
| FieldNext method | Extended to support fields of the types txFieldMSWord and txFieldHighEdit. |
Events
| Member | Change |
|---|---|
| HeaderFooterActivated event | Extended to support sections. SectionCurrent receives the number of the section that the header or footer belongs to. |
| HeaderFooterDeactivated event | Extended to support sections. SectionCurrent receives the number of the section that the header or footer belongs to. |
Update Notes
| Feature | Update note |
|---|---|
| HeaderFooterSelect method | Earlier versions of TX Text Control accepted txMain as a parameter to deselect a header or footer, although the manual did not allow it. It was invalid before but did not cause an error. Version 14.0 improves the error handling: to deselect a header or footer, pass the value 0 (automatic mode). |
| HeaderFooterSelect method | Earlier versions also allowed selecting a footer while a header was selected. In version 14.0, a header or footer can be selected only in automatic mode. Headers and Footers describes the details. |
| Sections and page settings | Before version 14.0, properties such as PageHeight and PageWidth always applied to the entire document. In version 14.0, each section of a document can have its own page settings. If you use one of the page properties without selecting a section first, it affects all sections. |
| Page orientation, portrait and landscape | This incompatibility can occur with the internal format of TX Text Control; other formats, including DOC, RTF and HTML, are not affected. Earlier versions simulated landscape orientation by exchanging the width and height of a document. The new landscape mode of version 14.0 does not recognize this simulated landscape mode and displays a document formatted this way in portrait orientation. |