What's New in TX Text Control .NET for Windows Forms 25.0
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
| Area | What is new |
|---|---|
| Protection | Document permissions protected by a password, editable regions for named users, the RibbonPermissionsTab |
| User interface | Mini toolbars for text and objects, a Select Objects button, the ThesaurusDialog |
| Ribbons | A chart gallery, chart layout settings and the RibbonChartLayoutTab |
| Page layout | Objects on every page from headers and footers, page break settings in table rows |
| Platform | Compiled 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,AllowPrintingandReadOnly. They take effect when TextControl.EditMode changes fromEdittoReadAndSelect. - Password. With the value
UsePasswordofEditMode, 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 toEdit. - 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.
- Defining one. A region is defined by a start position and a length or by a selection, and regions can overlap. TextControl.EditableRegions returns the EditableRegionCollection of the main text, which adds and removes regions; text frames and headers and footers have their own.
- Users. EditableRegion.UserName names the user who may edit the region in a read-only document; an empty string opens it to everyone. TextControl.UserNames sets the users who have access to the document.
- Highlighting. A region is highlighted on the screen in a color that depends on the user name by default. EditableRegion.HighlightColor sets another color.
- Events. EditableRegionCreated,
EditableRegionDeleted, EditableRegionEntered andEditableRegionLeftoccur on theTextControl. - What the user can do. In a protected document, the input position decides whether text can be edited and formatted. CanEdit, CanCharacterFormat, CanParagraphFormat and CanTableFormat, together with
CanDocumentFormat,CanStyleFormatandCanPrint, tell an application which menu items and buttons to enable. - Ribbon tab. The RibbonPermissionsTab is a user interface for setting restrictions and adding editable regions.
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
ObjectMiniToolbarInitializedoccur right after a built-in toolbar was initialized.
Context Menus covers the mini toolbar of today's version.
Ribbons for Charts
- Chart gallery. The RibbonInsertTab has a gallery for selecting the type of a new chart.
- Chart layout. The RibbonFrameLayoutTab sets general layout features of a chart. The new RibbonChartLayoutTab sets the chart's data, title, legend, axis titles and grid lines.
- Data relations. Connected to a RibbonReportingTab, the chart tab sets data relations in a built-in dialog box, the new ChartDataRelationDialog.
See Charts and Barcodes.
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.
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
- Coordinates. TextControl.ClientToDocument converts client coordinates into document coordinates in twips, and DocumentToClient converts them back. FrameBase.Bounds returns the bounding rectangle of a frame relative to the document.
- Words and resets. TextControl.SelectWord selects the word at the input position. ContentsReset occurs when all text has been deleted and all attributes reset, and SubTextPartCreated and
SubTextPartDeletedreport changes of subtext parts. - .NET Framework. TX Text Control 25.0 is compiled with the .NET Framework 4.0.
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
- DocumentPermissions
- DocumentServer.Windows.Forms.ChartDataRelationDialog
- EditableRegion
- EditableRegionCollection
- EditableRegionEventArgs
- MiniToolbar
- MiniToolbarInitializedEventArgs
- MiniToolbarOpeningEventArgs
- ObjectMiniToolbar
- TextMiniToolbar
- ThesaurusDialog
- Windows.Forms.Ribbon.RibbonChartLayoutTab
- Windows.Forms.Ribbon.RibbonPermissionsTab
.NET Members by Class
Next Steps
- Version 26.0: the features of the next version.
- Version 24.0: the features of the previous version.
- Older Versions: all versions from 29.0 back to 10.1.
- TX Text Control X15 and TX Spell .NET 7.0 Released: the release announcement on the Text Control Blog.