TX Text Control .NET for Windows Forms

What's New in TX Text Control .NET for Windows Forms 20.0

Topic

Right-to-left languages such as Arabic and Hebrew arrived in TX Text Control .NET for Windows Forms with version 20.0, both in the text and in the design of the controls. The version also formats text for a language, hyphenates it with TX Spell .NET and merges business objects and data relations in MailMerge.

Version 20.0 was released in November 2013 as TX Text Control X10, together with TX Spell .NET 4.0 and TX Barcode .NET 3.0. The press release Press Release: TX Text Control X10 Released - Reporting and Right-to-Left Support also says that all components became fully compatible with multi-threading, which speeds up the creation of documents in batches. The WPF controls received the same right-to-left design, language support and buttons; they are part of TX Text Control .NET for WPF.

Version 20.0 at a Glance

AreaWhat is new
Right-to-left textBidirectional lines, right-to-left paragraphs, Arabic Kashida justification
Right-to-left designMirrored text control, ruler bar, button bar, status bar, dialog boxes and context menus
LanguagesA language for each piece of text, a language dialog box, the language in the status bar
HyphenationAutomatic hyphenation with TX Spell .NET 4.0
Button barButtons for more font attributes, font sizes, indents and the writing direction
Mail mergeData relations in every Merge overload, MergeObjects, image merging by name, NEXT and NEXTIF fields, report data source configurations
Page imagesImages of pages with the elements shown on screen

Right-to-Left Text

  • Bidirectional lines. A line can contain text written from left to right and text written from right to left. Behind a left-to-right character, the input position is on its right side; behind a right-to-left character, it is on its left side.
  • Paragraph direction. ParagraphFormat.Direction formats a paragraph from right to left with the Direction value RightToLeft, so that its blocks of bidirectional text are ordered from right to left. The paragraph formatting dialog box offers the same setting to users. In such a paragraph, a tab position is measured from the right page margin, and the natural alignment and the natural tab kind are right-aligned. The horizontal ruler bar shows the origin at the right page margin.
  • Change the direction. Selection.ChangeDirection changes the writing direction of the selected paragraphs. It swaps left and right alignment and left and right tabs; centered and justified paragraphs keep their alignment.
  • Kashida justification. Justified Arabic text can be stretched with Kashida lines instead of, or in addition to, wider spaces. ParagraphFormat.Justification takes a Justification value: Spaces, Kashida or SpacesAndKashida.
  • Input format. InputFormat.LeftToRight and InputFormat.RightToLeft tell the direction at the input position.

Text and Paragraph Formatting shows how to format paragraphs in the current version.

Right-to-Left Application Design

Every control of TX Text Control .NET for Windows Forms supports the RightToLeft property for applications with a right-to-left design:

  • Text control. A TextControl shows its vertical scroll bar at the left border and zooms from the top right corner.
  • Bars. The RulerBar shows a right-to-left ruler, and the ButtonBar and the StatusBar arrange their buttons and text parts from right to left.
  • Dialog boxes and context menus. All built-in dialog boxes and context menus are shown with a right-to-left design.

Right-to-Left UI describes the right-to-left design of the current version.

Languages and Hyphenation

Spell Checking and Hyphenation covers spell checking and hyphenation in the current version.

Button Bar

The ButtonBar received predefined buttons for strikeout, subscript and superscript text, for growing and shrinking all font sizes of a selection, for increasing and decreasing the paragraph indents and for switching the writing direction between left-to-right and right-to-left. See Toolbars and Mini Toolbars.

Mail Merge

MailMerge creates documents from a template and data. Version 20.0 extended it considerably:

  • Data relations in every overload. All overloads of Merge process the relations between the tables of the data, which makes master-detail templates such as invoices with line items easier to merge. MergeBlocks is obsolete: it needed an extra merge block around the whole document for the same result.
  • Business objects. MergeObjects takes any collection of objects as the data source. See Objects and Collections.
  • Images. Images in the template are replaced by name with the image data of the column of the same name and scaled to the width of the placeholder image. The column holds a byte array, System.Drawing.Image objects, file names or hexadecimal strings that start with X'. The ImageMerged event passes an ImageMergedEventArgs object. Column names of image merge fields no longer need the prefix image:, which still works. See Images and Barcodes.
  • Formats of merge fields. MergeField.DateTimeFormat and MergeField.NumericFormat hold the date and time format and the numeric format of a MERGEFIELD, which its field dialog box can now set.
  • NEXT and NEXTIF fields. The adapters NextField and NextIfField implement the MS Word fields NEXT and NEXTIF. See Conditional Content.
  • Report data source configurations. ReportDataSourceConfigFile takes the path of a report data source configuration file (.rdsc) created with TX Text Control Words, and ReportDataSourceConfig takes the same content as an XML string. See Data Source Configuration Files.
  • Template file. TemplateFile sets the path of the template, instead of calling LoadTemplate. The format is taken from the file extension.

Pages and Input Position

  • Screen elements in page images. The PageContent value ScreenElements makes Page.GetImage include what a screen shows in addition to the text, such as the selection, control characters and helper lines.
  • Caret size. InputPosition.CaretSize gets the size of the caret at the input position, in pixels.

Upgrade to Version 20.0

  • MergeBlocks. MailMerge.MergeBlocks is obsolete. Merge templates with Merge and pass the data with its relations. Deprecated APIs describes the replacement.
  • PageContent. The PageContent enumeration has the new value ScreenElements.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 20.0 lists for TX Text Control .NET for Windows Forms. Names are relative to the TXTextControl namespace, each name links to its current reference page, and "(obsolete)" marks a member that is obsolete today.

New Classes

Members by Class

Next Steps

  • Version 21.0: the features of the next version.
  • Version 19.0: barcodes, even and odd headers and footers, context menus and page numbering.
  • Right-to-Left UI: right-to-left applications in the current version.