What's New in TX Text Control .NET for Windows Forms 19.0
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
| Area | What is new |
|---|---|
| Headers and footers | Different headers and footers for even and odd pages, a dividing line with a label |
| Barcodes | Barcode frames in the text, positioned like images, with a layout dialog box |
| Page numbering | Restarted numbering per section, the total number of pages, a page number dialog box |
| Context menus | Built-in context menus for text, headers and footers, images and text frames |
| Tables and control characters | A dialog box for new tables, the anchor symbol, permanent control characters |
| MS Word content controls | Imported from DOCX as application fields |
| Mail merge | Merging into barcodes and charts, canceling a merge, new events |
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.
ServerTextControlhas the same property. - Layout dialog box. TextControl.BarcodeLayoutDialog opens a dialog box for the position, the size and the distances to the text.
- Events.
TextControlreports 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
- Restart the numbering. SectionFormat.RestartPageNumbering restarts the page numbers of a section instead of continuing those of the previous section.
- Total number of pages. A PageNumberField shows the total number of pages when ShowNumberOfPages is
true. NumberFormat and StartNumber set its format and its first number. - Page number dialog box. PageNumberField.PageNumberDialog opens a built-in dialog box for the format and the numbering of a page number field.
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
- Barcodes. MailMerge merges data into a
BarcodeFramewhose name is the name of a table column, like a merge field. This also works in merge blocks. See Images and Barcodes. - Charts. Data is merged into a ChartFrame outside of merge blocks through data relations, which have to be part of the
DataTablepassed to Merge. - Cancel a merge. After each merged data row, setting Cancel of the DataRowMerged event stops the merge, which then throws a MergeCanceledException.
- Events. BarcodeMerged and ChartMerged occur after a barcode or a chart has been merged.
- Block fields. GetBlockFieldNames returns the field names of a merge block, and IncludeTextMergingEventArgs.IncludeTextField returns the INCLUDETEXT field that is being merged.
Upgrade to Version 19.0
- HeaderFooterType. The methods of
HeaderFooterCollectionaccept the new valuesEvenHeaderandEvenFooter. Code that handles all values of HeaderFooterType has to handle these as well. - HeaderFooterFrameStyle.
TextControl.HeaderFooterFrameStylehas the new settingDividingLine.
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
- DataVisualization.BarcodeCollection
- DataVisualization.BarcodeEventArgs
- DataVisualization.BarcodeFrame
- DocumentServer.MailMerge.BarcodeMergedEventArgs
- DocumentServer.MailMerge.ChartMergedEventArgs
- DocumentServer.MergeCanceledException
- TextContextMenuEventArgs
Members by Class
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.