What's New in TX Text Control ActiveX 19.0
What did TX Text Control ActiveX 19.0 add over version 18.0? Page numbering per section, built-in context menus, different headers and footers for even and odd pages, new table and print dialog boxes and permanent control characters, each described below with the members that implement it.
New Features
- Page numbering. Page numbers can continue from the previous section or restart with a certain start number in each section of a document, set with SectionRestartPageNumbering. The new field type
txFieldAllPages, defined with FieldType, is a text field that shows the number of pages in the document or section. A new built-in dialog box, opened with PageNumberDialog, changes the formatting and numbering attributes of page number fields. - Built-in context menus.
TXTextControlnow has built-in context menus. Depending on the area the user right-clicks, a menu with standard options for this area opens: one for standard text formatting, one for inserting or editing headers and footers and changing page settings, and one for images and text frames. Before a built-in context menu opens, the ContextMenuOpening event occurs. Setting itsCancelparameter toTruekeeps the menu from opening. - Headers and footers. A document, or a single section of it, can have different headers and footers for even and odd pages:
- A section contains either the same header or footer on all pages or different ones for even and odd pages.
- All Header and Footer properties and methods accept the new constants
txEvenHeaderandtxEvenFooterfor theirHeaderFooterparameter. When an even header or footer is defined,txHeaderandtxFooterspecify the odd header or footer; otherwise they specify the header or footer of all pages. - The built-in SectionFormatDialog dialog box lets an end user select different headers and footers for even and odd pages.
- An activated header or footer is now separated from the main text by a dividing line instead of a frame. The line has a label that tells which type of header or footer (even, odd, first page) is activated. HeaderFooterStyle still offers the former activation styles, and DisplayColor sets the colors of dividing lines and labels.
- Tables. A new built-in dialog box, opened with TableInsertDialog, inserts a table. The user specifies the number of columns and rows and the column width, and whether the table has a header and whether its rows can break across a page border. The new TableCellSelect method selects a cell, a row, a column or the complete table, and the new TableDelete method deletes a complete table from the document.
- Printing. The new PrintDialog method opens a built-in dialog box and then prints the document. In the dialog box, the user selects a printer, a range of pages and a number of copies.
- Control characters. A new control character shows the anchor position of an anchored object. Anchored objects are positioned relative to a paragraph, and the anchor is shown to the left of this paragraph's first character, only while an anchored object is selected. In addition, individual control characters can be shown permanently on the screen, independently of the ControlChars property, with the new PermanentControlChars property.
New Properties, Methods and Events
All new members belong to TXTextControl.
Properties
| Member | Description |
|---|---|
| PermanentControlChars | Gets or sets which control characters are shown permanently on the screen. |
| SectionRestartPageNumbering | Returns or sets whether page numbering restarts at the beginning of a document section. |
Methods
| Member | Description |
|---|---|
| PageNumberDialog | Opens a built-in dialog box to set the formatting attributes of the specified page number field. |
| PrintDialog | Opens the system print dialog box and prints a TXTextControl document as specified in it. |
| TableCellSelect | Selects a table cell, a table row, a table column or a complete table. |
| TableDelete | Deletes a complete table from the document. |
| TableFromSelection | Returns the table identifier of the currently selected table. |
| TableInsertDialog | Opens a built-in dialog box with options to define a new table. |
Events
| Member | Description |
|---|---|
| ContextMenuOpening | Occurs before a built-in context menu opens. |
Extended Properties, Methods and Events
All extended members belong to TXTextControl.
| Member | Change |
|---|---|
| HeaderFooter property | The new constants txEvenHeader and txEvenFooter support different headers and footers on the even and the odd pages of a document. |
| HeaderFooterAtInputPos property | The new constants txEvenHeader and txEvenFooter have been added. |
| HeaderFooterPosition property | The new constants txEvenHeader and txEvenFooter have been added. |
| HeaderFooterActivate method | The new constants txEvenHeader and txEvenFooter have been added. |
| HeaderFooterSelect method | The new constants txEvenHeader and txEvenFooter have been added. |
| HeaderFooterActivated event | The new constants txEvenHeader and txEvenFooter have been added. |
| HeaderFooterStyle property | The new setting txDividingLine has been added. |
| DisplayColor property | The new index values txHeaderFooterLineColor and txHeaderFooterLabelColor have been added. |
| FieldNext method | Supports fields of the type txFieldAllPages. |
| FieldType property | Defines fields of the type txFieldAllPages. |
| FieldTypeData property | Defines the data of fields of the type txFieldAllPages. |