What's New in TX Text Control ActiveX 16.0
With version 16.0, TX Text Control ActiveX got an interface for spell checkers: TXTextControl raises an event when text changes, underlines the misspelled words it is told about and gives your code access to them. Table headers repeated on each page, an image of each page and new buttons for font sizes and indents came with it.
The features, the new members and the extended members of version 16.0 follow.
New Features
- Table headers. Each table in a document can have a header of one or more table rows, which is repeated on top of each page when the table extends over several pages. If the table extends over several columns of a page, the header is displayed on top of each column. Users define the header in the table attributes dialog box, which was extended for it. In code, the txTableCellIsHeader attribute of the TableCellAttribute property sets it.
- Page images. TX Text Control provides an image of each page of a document, which you can use with the Picture property of a Form object, a PictureBox control or an Image control. The new PageImage property gets the image.
- Extended user interface. The TXButtonBar has new buttons that grow and shrink the font sizes of all selected fonts and increase or decrease the left indent of all selected paragraphs. The TXTextControl has matching methods for your code: GrowFont, ShrinkFont, IncreaseIndent and DecreaseIndent.
- Spell checking. A new spell checker interface lets you use any spell checker with a
TXTextControl. Each time the text of a document changes, the SpellCheckText event occurs. Its data contains the text to check for misspelled words, and it receives an array of start and end positions that tellsTXTextControlwhere the misspelled words are. These words are underlined with a red zigzag line. Spell checking is active only if the EnableSpellChecking property is set to True. - Misspelled words in code. New properties give you access to all misspelled words of the document. MisspelledWords returns their total number, MisspelledWordStart and MisspelledWordLength return the position and length of a misspelled word, and MisspelledWordAtInputPos returns the number of the misspelled word at the current text input position. The MisspelledWordDelete method corrects the misspelled text.
New Properties, Methods and Events
Properties
| Member | Description |
|---|---|
| TXButtonBar.PosDecreaseIndent | Returns or sets the position of a button that decreases the left indent of all selected paragraphs. |
| TXButtonBar.PosGrowFont | Returns or sets the position of a button that grows the font sizes of all selected fonts. |
| TXButtonBar.PosIncreaseIndent | Returns or sets the position of a button that increases the left indent of all selected paragraphs. |
| TXButtonBar.PosShrinkFont | Returns or sets the position of a button that shrinks the font sizes of all selected fonts. |
| TXTextControl.EnableSpellChecking | Gets or sets a value indicating whether spell checking is active. |
| TXTextControl.MisspelledWordAtInputPos | Gets the number of the misspelled word at the current text input position. |
| TXTextControl.MisspelledWordLength | Gets the length of the misspelled word with the specified number. |
| TXTextControl.MisspelledWords | Gets the current number of misspelled words. |
| TXTextControl.MisspelledWordStart | Gets the zero-based position of the misspelled word with the specified number. |
| TXTextControl.PageImage | Returns an image of the specified page, which can be used with the Picture property of a Form object, a PictureBox control or an Image control. |
Methods
| Member | Description |
|---|---|
| TXTextControl.DecreaseIndent | Decreases the left indent of all paragraphs in the current text selection. |
| TXTextControl.GrowFont | Increases the font size of each font in the current text selection. |
| TXTextControl.IncreaseIndent | Increases the left indent of all paragraphs in the current text selection. |
| TXTextControl.MisspelledWordDelete | Removes the specified misspelled word from the document. |
| TXTextControl.ShrinkFont | Decreases the font size of each font in the current text selection. |
Events
| Member | Description |
|---|---|
| TXTextControl.SpellCheckText | Occurs if the text of the document has been altered and the spelling of the new text must be checked. |
Extended Properties, Methods and Events
Properties
| Member | Change |
|---|---|
| TableCellAttribute property | Extended with the txTableCellIsHeader attribute, which gets or sets a value indicating whether the table cell belongs to the header of the table. |