TX Text Control .NET for Windows Forms

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

Topic

Barcodes became part of the document in TX Text Control .NET for Windows Forms 19.0, next to images, text frames and charts. The TextControl got built-in context menus, headers and footers with separate content for even and odd pages and a dividing line in place of their frame, and MailMerge learned to fill barcodes and charts with data.

Version 19.0 was released in April 2013 as TX Text Control X9, together with the new TX Barcode .NET 2.0, as the blog article TX Text Control X9 and TX Barcode .NET Have Been Released announced. The WPF control received the same features; they are part of TX Text Control .NET for WPF and aren't listed here.

Version 19.0 at a Glance

AreaWhat is new
Headers and footersDifferent headers and footers for even and odd pages, a dividing line with a label
BarcodesBarcode frames in the text, positioned like images, with a layout dialog box
Page numberingRestarted numbering per section, the total number of pages, a page number dialog box
Context menusBuilt-in context menus for text, headers and footers, images and text frames
Tables and control charactersA dialog box for new tables, the anchor symbol, permanent control characters
MS Word content controlsImported from DOCX as application fields
Mail mergeMerging into barcodes and charts, canceling a merge, new events

Headers and Footers

  • Even and odd pages. A document, or a single section, can have different headers and footers for even and odd pages. The methods Add, GetItem and Remove of HeaderFooterCollection accept the HeaderFooterType values EvenHeader and EvenFooter. When an even header or footer exists, a header or footer of the type Header or Footer is the one of the odd pages; otherwise, it is used on all pages. In the built-in dialog box of SectionFormatDialog, users choose different headers and footers for even and odd pages.
  • Dividing line. An activated header or footer is separated from the main text by a dividing line instead of a frame. A label on the line tells whether the header or footer belongs to even, odd or first pages. TextControl.HeaderFooterFrameStyle has the new setting DividingLine and still offers the earlier styles.
  • Colors. TextControl.Colors sets the colors of the line and the label with HeaderFooterLineColor and HeaderFooterLabelColor.

See Headers and Footers.

Barcodes

Barcode controls of the type TXTextControl.Barcode.TXBarcodeControl can be inserted into a document:

  • Position. A barcode is placed like an image or a text frame: as a character in the text, anchored to a paragraph or at a fixed position in the document. A DataVisualization.BarcodeFrame positions it and is connected to the barcode control, which holds the appearance and the data.
  • Collection. TextControl.Barcodes returns a DataVisualization.BarcodeCollection, which adds and removes barcodes. ServerTextControl has the same property.
  • Layout dialog box. TextControl.BarcodeLayoutDialog opens a dialog box for the position, the size and the distances to the text.
  • Events. TextControl reports barcodes that are created, deleted, selected, deselected, moved, sized and clicked, for example with BarcodeCreated and BarcodeSelected. New selection events also exist for images, text frames and charts, such as ImageSelected and TextFrameDeselected.
  • Formats. The TX Text Control format and RTF save a barcode as a barcode, which is rebuilt when the document is loaded. Other formats save its image. On a system without the barcode controls, the image is inserted instead.

Charts and Barcodes shows how barcodes are used in the current version.

Page Numbering

Context Menus

The TextControl shows built-in context menus when users click the right mouse button. The menu depends on where they click: one for formatting text, one for inserting and editing headers and footers and changing the page settings, and one for images and text frames. The TextContextMenuOpening event occurs before a menu opens; its TextContextMenuEventArgs let a handler change or extend the menu, show a menu of its own or suppress it. See Context Menus.

Tables and Control Characters

  • Insert a table with a dialog box. A new overload of TableCollection.Add opens a built-in dialog box in which users specify the new table.
  • Anchor symbol. A new control character marks where an object anchored to a paragraph is anchored. It is shown left of the first character of the paragraph while the object is selected.
  • Permanent control characters. TextControl.PermanentControlChars shows individual control characters at all times, independently of ControlChars.

MS Word Content Controls

When a DOCX document is loaded, its MS Word content controls are converted to fields of the type ApplicationField. Version 21.0 added adapter classes for them. See Fields and Subtext Parts.

Mail Merge

Upgrade to Version 19.0

  • HeaderFooterType. The methods of HeaderFooterCollection accept the new values EvenHeader and EvenFooter. Code that handles all values of HeaderFooterType has to handle these as well.
  • HeaderFooterFrameStyle. TextControl.HeaderFooterFrameStyle has the new setting DividingLine.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 19.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. The version's own list also names the ShapeDeleted events of Drawing.TXDrawingControl and Drawing.TXDrawingCore, classes that the reference dates to versions 23.0 and 33.0; they are left out here. The list also names PageNumberField as a new class, but PageNumberFieldCollection already took PageNumberField objects in version 13.0, so it isn't listed under New Classes.

New Classes

Members by Class

ClassPropertiesMethodsEvents
DataVisualization.BarcodeCollectionAdd, CopyTo, GetItem, Remove
DataVisualization.BarcodeEventArgsBarcodeFrame
DataVisualization.BarcodeFrameBarcode, ExportCompressionQuality, ExportFileName, ExportFilterIndex, ExportResolution, SaveModeAddUndoUnit, Refresh
DocumentServer.MailMergeGetBlockFieldNamesBarcodeMerged, ChartMerged
DocumentServer.MailMerge.BarcodeMergedEventArgsBarcodeFrame
DocumentServer.MailMerge.ChartMergedEventArgsChartFrame
DocumentServer.MailMerge.DataRowMergedEventArgsCancel
DocumentServer.MailMerge.IncludeTextMergingEventArgsIncludeTextField
PageNumberFieldNumberFormat, ShowNumberOfPages, StartNumberPageNumberDialog
SectionFormatRestartPageNumbering
ServerTextControlBarcodesOnBarcodeCreated, OnBarcodeDeletedBarcodeCreated, BarcodeDeleted
TextContextMenuEventArgsContextMenuLocation, Location, TextContextMenu
TextControlBarcodes, PermanentControlCharsBarcodeLayoutDialog, OnBarcodeClicked, OnBarcodeCreated, OnBarcodeDeleted, OnBarcodeDeselected, OnBarcodeDoubleClicked, OnBarcodeMoved, OnBarcodeRightClicked, OnBarcodeSelected, OnBarcodeSized, OnChartDeselected, OnChartSelected, OnImageDeselected, OnImageSelected, OnTextContextMenuOpening, OnTextFrameDeselected, OnTextFrameSelectedBarcodeClicked, BarcodeCreated, BarcodeDeleted, BarcodeDeselected, BarcodeDoubleClicked, BarcodeMoved, BarcodeRightClicked, BarcodeSelected, BarcodeSized, ChartDeselected, ChartSelected, ImageDeselected, ImageSelected, TextContextMenuOpening, TextFrameDeselected, TextFrameSelected
TextControl.ColorsHeaderFooterLabelColor, HeaderFooterLineColorResetHeaderFooterLabelColor, ResetHeaderFooterLineColor

Next Steps

  • Version 20.0: the features of the next version.
  • Version 18.0: charts, z-order, transparent text frames and the new status bar design.
  • Context Menus: change the context menus of the current version.