What's New in TX Text Control .NET for Windows Forms 15.1
Drag and drop became a built-in feature of the Windows Forms TextControl in version 15.1, and the colors of the control and its button bar, ruler bar and status bar became configurable. Images and text frames got a common base class with an identifier, a name and a position that code can change, and all images of a document could be exported in one format.
Version 15.1 was released in December 2009 as TX Text Control .NET for Windows Forms 15.1 and TX Text Control Server for ASP.NET (incl. Windows Forms) 15.1, as the blog article TX Text Control 15.1 Has Been Released announced. According to the press release, it also improved the rendering quality of images.
Version 15.1 at a Glance
| Area | What is new |
|---|---|
| Drag and drop | The TextControl as a source and a target of drag and drop operations |
| Display colors | Configurable colors for the text control and its bars |
| Zoom and mouse wheel | No 400 percent limit in page view, horizontal scrolling and zooming with the mouse wheel |
| Images and text frames | The FrameBase class with an ID and a name, settable insertion mode and location, alignment of anchored frames |
| Saving images | One export format and saving mode for all images of a document |
| Inserting images | Images from System.Drawing.Image objects |
| Fonts | The fonts the formatting device supports |
Drag and Drop
The TextControl has a built-in drag and drop functionality:
- Target and source. TextControl.AllowDrop makes the control a target for data that users drag onto it, and TextControl.AllowDrag makes it a source.
- Formats. The control accepts text as RTF, HTML or plain text and images as device-dependent or device-independent bitmaps, TIFF images or Windows metafiles. TextControl.DropFormats sets the formats it accepts. Other data, such as files, is handled in the
DragEnter,DragOver,DragLeaveandDragDropevents, because the control doesn't know what the application does with it. - Behavior. While users drag over the control, a non-blinking caret shows where the data will be inserted. Text is moved by default and copied with the CTRL key, and the ESC key cancels the operation.
Drag and Drop covers drag and drop in the current version.
Display Colors
The colors of the display elements of the text control and its toolbars can be changed when the controls use the ColorScheme border style. By default, the controls use a fixed color table for the standard themes of Windows XP, Windows XP Media Center Edition, Windows Vista and Windows 7; with other themes the colors depend on the theme, and without a theme on the system colors. The DisplayColors properties of TextControl, ButtonBar, RulerBar and StatusBar take objects of the new classes TextControl.Colors, ButtonBar.Colors, RulerBar.Colors and StatusBar.Colors. See Themes, Colors, and Icons.
Zoom and Mouse Wheel
- Unlimited zoom factor. When ViewMode is
PageVieworNormal, TextControl.ZoomFactor is no longer limited to 400 percent. The other view modes keep the limit. - Mouse wheel. With the SHIFT key pressed, the mouse wheel scrolls the visible part of the document horizontally; with the CTRL key pressed, it zooms the document.
Images and Text Frames
Images and text frames share the new base class FrameBase:
- Identifier and name. FrameBase.ID and FrameBase.Name identify an image or a text frame. ImageCollection.GetItem and TextFrameCollection.GetItem find one by its identifier or its name.
- Position. FrameBase.Location and the
InsertionModeof images and text frames can be set, so that code can move an object or change how it is inserted. - Alignment. FrameBase.Alignment aligns an image or a text frame that is anchored to a paragraph.
- Images from memory. A new constructor of Image takes a
System.Drawing.Imageobject, so that an image can be inserted without a file.
Images and Text Frames and Shapes show how to work with them today.
Saving Images and Fonts
- Image export for the whole document. SaveSettings.ImageSaveMode and SaveSettings.ImageExportFilterIndex save all images of a document with one saving mode and in one format. See Saving and Converting Documents.
- Supported fonts. TextControl.GetSupportedFonts returns the names of all fonts that the formatting device set with FormattingPrinter supports.
ServerTextControlhas the same method.
Upgrade to Version 15.1
The properties FrameBase.Location, Image.InsertionMode and TextFrame.InsertionMode were read-only before and can now be set.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 15.1 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 ButtonBar and ImageCollection as new classes, but version 13.0 already added the ColorScheme setting to the ButtonStyle and BorderStyle properties of the button bar, and version 12.0 added overloads of ImageCollection.Add for anchored images, so neither is listed under New Classes.
New Classes
Members by Class
Next Steps
- Version 16.0: the features of the next version.
- Version 15.0: columns, PDF/A, PDF import, paragraphs, structured lists and clipboard formats.
- Drag and Drop: drag and drop in the current version.