New Features and Update Notes

TX Text Control 20.0 provides the following new features:

Right to Left Support

Text Control supports right to left text rendering for languages such as Arabic or Hebrew. Each line in a document can be bidirectional, which means, that it can contain text parts written from left to right and text parts written from right to left. The text input position behind a left-to-right character is on its right side and the input position behind a right-to-left character is on its left side. In addition, a paragraph can be formatted from right to left, which means that the blocks of bidirectional text are ordered from right ro left. The ParagraphFormat.Direction property has been added to support this feature. The paragraph formatting dialog box has also been extended to enable an end-user to format a paragraph from right to left. A tabulator in a right-to-left paragraph is a distance from the document's right page margin. When a paragraph is justified, TextControl now supports the insertion of Arabic Kashida lines in addition to expanding spaces. The ParagraphFormat.Justification property can be used to set the kind of justification for each paragraph. Both justification features can be combined. The horizontal ruler bar has been extended to show the horizontal origin in a right-to-left paragraph at the right page margin. In right to left text the natural paragraph alignment and tabulator kind is right aligned. The new Selection.ChangeDirection method can be used to changed the writing direction of one or more paragraphs. When the direction of a paragraph is changed this paragraph's alignment is toggled from left to right or from right to left. The alignment of centered and justified paragraphs is not changed. Left and right tabulators are also toggled.

Right to Left Application Design

To support a right to left application design, all TX TextControl controls support the RightToLeft property. A TextControl or WPF.TextControl then shows the vertical scrollbar at the left border and has a zoom origin at the top right corner. All built-in dialog boxes and context menus have a right-to-left design. The RulerBar control has a right-to-left ruler and the ButtonBar and StatusBar controls show their buttons or text parts from right to left.

Hyphenation

TextControl supports the TXSpellChecker 4.0 component, which, in addition to spell checking, can be used to hyphenate a document. This component must be connected with a TextControl through the TextControl.SpellChecker property and automatic hyphenation must be activated with the TextControl.IsHyphenationEnabled property. Every time a word does not fit in the line the spell checker component calculates a dividing position. TextControl then raises the TextControl.HyphenateWord event and sends the calculated position with the event's data. The calculated position can be changed through the event handler. TextControl then uses the calculated or changed position to divide the word and insert a hyphen at the end of the line.

Multilingual Documents

A piece of text can be formatted now for a specific language, which is used for spell checking and hyphenation. A document can be multilingual, which means that multiple languages can be used in the same document. A new built-in dialog box available with the TextControl.LanguageDialog method can be used to get or to set the language for a selection of text or for the current text input position. Programmatically, this can be done with the Selection.Culture property. All text filters have been adapted to support language settings in other text formats. The StatusBar and WPF.StatusBar controls offer the new ShowLanguage property to show the language at the text input position.

Button Bar

Additional predefined buttons have been added to the ButtonBar and WPF.ButtonBar classes. The StrikeOutButton, SubscriptButton and SuperscriptButton buttons have been added to set additional font attributes. The GrowFontSizeButton and ShrinkFontSizeButton buttons can be used to grow or shrink all font sizes in a text selection and the IncreaseIndentButton and DecreaseIndentButton buttons increase or decrease the paragraph indents in a text selection. The LeftToRightButton and RightToLeftButton buttons set the writing direction either left-to-right or right-to-left.

Mail Merge

Until now column names of table columns which were used to supply the merge data for image merge fields (i. e. MERGEFIELD fields with the prefix "image:") also had to begin with the prefix "image:". From now on this is no longer necessary although it still works to ensure backward compatibility. The field dialog of MERGEFIELD fields has been expanded by two text boxes, one for the date / time format flag, one for the numeric format flag. Images are now included in the merge process and are replaced according to their name. Merged images are scaled up / down such that they maintain the same width as the placeholder image in the template. To enable image merging the table column containing the image data has to contain one of the following: Either binary data as a byte array, objects of type System.Drawing.Image, file names or hexadecimal strings beginning with "X'". All overloads of the method Merge now process data relations. This makes it easier to create and merge template documents containing master detail relations. (e. g. Invoices containing order and customer informations together with order details such as a list of purchased articles.) Using the now obsolete method MergeBlocks required an additional merge block surrounding the whole document to achieve the same merge result. Yet another improvement is the possibility to use any collection of objects as a data source using the new method MergeObjects. For detailed information have a look at the documentation of that method.

Page.GetImage Method

The ScreenElements member has been added to the PageContent enumeration, which can be used to get an image of a page containing all elements which are additionally displayed on a screen, such as the selection, the control characters and helper lines.