TX Text Control .NET for Windows Forms

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

Topic

Protected documents are the main subject of version 25.0: a document can forbid editing, formatting, printing or copying, while editable regions stay open to named users, and a new ribbon tab sets both up. For the Windows Forms user interface, the version added mini toolbars, ribbon support for charts and a thesaurus dialog box.

Version 25.0 was released on December 13, 2017, as TX Text Control X15, together with TX Text Control .NET Server, TX Text Control .NET for WPF, TX Text Control ActiveX and TX Spell .NET 7.0. Its last full installer is dated November 21, 2018. The features below are the ones added since version 24.0.

Version 25.0 at a Glance

AreaWhat is new
ProtectionDocument permissions protected by a password, editable regions for named users, the RibbonPermissionsTab
User interfaceMini toolbars for text and objects, a Select Objects button, the ThesaurusDialog
RibbonsA chart gallery, chart layout settings and the RibbonChartLayoutTab
Page layoutObjects on every page from headers and footers, page break settings in table rows
PlatformCompiled with the .NET Framework 4.0

Documents With Restricted Access

The TextControl edits documents that forbid editing, printing, formatting or copying content to the clipboard. See Document Protection and Editable Regions.

  • Permissions. TextControl.DocumentPermissions returns a DocumentPermissions object with the settings AllowCopy, AllowFormatting, AllowFormattingStyles, AllowPrinting and ReadOnly. They take effect when TextControl.EditMode changes from Edit to ReadAndSelect.
  • Password. With the value UsePassword of EditMode, a dialog box asks the user for a password that protects the restrictions. The same password has to be entered to set the edit mode back to Edit.
  • Storage. The permissions and the password are saved in the document in encrypted form, and a password-protected document opens read-only. RTF, DOC, DOCX, PDF and the TX Text Control format support them.

Editable Regions

An EditableRegion is a piece of text that stays editable after EditMode has been set to ReadAndSelect.

Document Protection and User Permissions describes the security side of these settings.

Mini Toolbars

Besides context menus, the TextControl shows built-in mini toolbars, small toolbars with the formatting commands of the current context. One appears when the right mouse button is released, or when the left mouse button is released over selected text. TextControl.ShowMiniToolbar controls this.

  • Kinds. The TextMiniToolbar formats text and has extra items inside tables. The ObjectMiniToolbar formats images, text frames, drawings and barcodes. Both derive from MiniToolbar.
  • Changing them. MiniToolbarOpening occurs before a built-in mini toolbar is shown. A handler changes or extends the toolbar, replaces it with its own or suppresses it. TextMiniToolbarInitialized and ObjectMiniToolbarInitialized occur right after a built-in toolbar was initialized.

Context Menus covers the mini toolbar of today's version.

Ribbons for Charts

See Charts and Barcodes.

Objects in Headers and Footers

While a header or footer is active, images, text frames, barcodes and drawings can be inserted anywhere on the page. Such an object appears in the background of every page that shows the header or footer, for example as a watermark. It has to be inserted at a fixed position on the page: FrameBase.InsertionMode must be the value FixedOnPage of FrameInsertionMode. The position of these objects doesn't change the height of the header or footer. See Headers and Footers.

Selection of Objects in the Background

TextControl.SelectObjects decides what a mouse click selects where an object lies behind the text. With true, the click selects the object in the background; with false, it selects the text in front of it. The RibbonFormattingTab received a Select Objects button.

Pagination in Tables

The pagination settings "keep with next" and "page break before" work in tables. Because a table row holds several paragraphs, the first paragraph of a row decides for the whole row, and the settings of the other paragraphs are ignored:

  • Page break before moves the whole row to a new page.
  • Keep with next keeps the row on the same page as the row that follows it.

See Tables and Table Formulas.

Thesaurus

TX Text Control finds synonyms for a word. The RibbonProofingTab received two buttons: one loads thesaurus files from a directory, the other opens the built-in ThesaurusDialog, which shows the synonyms of the word at the input position. The thesaurus requires TX Spell .NET 7.0. See Spell Checking and Hyphenation.

Other Additions

Upgrade to Version 25.0

  • Update notes. PageCollection.GetItem received an overload that returns the page at a text input position, and PermanentControlChar was extended with the value Pagination.
  • Breaking changes. No other change of version 25.0 is known to break existing code. Breaking Changes starts with version 30.0.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 25.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. The list includes the members of ServerTextControl, the document processing class without a user interface that is part of this product too.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
DocumentPermissionsAllowCopy, AllowFormatting, AllowFormattingStyles, AllowPrinting, ReadOnly
EditableRegionDefaultHighlightColor, HighlightColor, HighlightMode, ID, Length, Number, Start, Text, UserNameSave, ScrollTo
EditableRegionCollectionCount, IsSynchronized, Item, SyncRootAdd, CopyTo, GetEnumerator, GetItem, GetItems, Remove
EditableRegionEventArgsEditableRegion
FrameBaseBounds
HeaderFooterEditableRegions
IFormattedTextEditableRegions
MiniToolbarRibbonGroups
MiniToolbarInitializedEventArgsMiniToolbar
MiniToolbarOpeningEventArgsLocation, MiniToolbar, MiniToolbarContext
ObjectMiniToolbarFindItem
ServerTextControlEditableRegionsOnContentsReset, OnEditableRegionCreated, OnEditableRegionDeleted, OnSubTextPartCreated, OnSubTextPartDeleted, SelectWordContentsReset, EditableRegionCreated, EditableRegionDeleted, SubTextPartCreated, SubTextPartDeleted
TextControlCanCharacterFormat, CanDocumentFormat, CanEdit, CanParagraphFormat, CanPrint, CanStyleFormat, CanTableFormat, DocumentPermissions, EditableRegions, SelectObjects, ShowMiniToolbar, UserNamesClientToDocument, DocumentToClient, OnContentsReset, OnEditableRegionCreated, OnEditableRegionDeleted, OnEditableRegionEntered, OnEditableRegionLeft, OnMiniToolbarOpening, OnObjectMiniToolbarInitialized, OnSubTextPartCreated, OnSubTextPartDeleted, OnTextMiniToolbarInitialized, SelectWordContentsReset, EditableRegionCreated, EditableRegionDeleted, EditableRegionEntered, EditableRegionLeft, MiniToolbarOpening, ObjectMiniToolbarInitialized, SubTextPartCreated, SubTextPartDeleted, TextMiniToolbarInitialized
TextFrameEditableRegions
TextMiniToolbarFindItem
ThesaurusDialogFindItem
Windows.Forms.Ribbon.RibbonChartLayoutTabFindItem
Windows.Forms.Ribbon.RibbonListViewMaxColumnCount, MinRowCountItemMouseDown, ItemMouseUp
Windows.Forms.Ribbon.RibbonPermissionsTabAllowAddingUserNames, RegisteredUserNamesFindItem

Next Steps