TX Text Control .NET for Windows Forms

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

Topic

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

AreaWhat is new
Drag and dropThe TextControl as a source and a target of drag and drop operations
Display colorsConfigurable colors for the text control and its bars
Zoom and mouse wheelNo 400 percent limit in page view, horizontal scrolling and zooming with the mouse wheel
Images and text framesThe FrameBase class with an ID and a name, settable insertion mode and location, alignment of anchored frames
Saving imagesOne export format and saving mode for all images of a document
Inserting imagesImages from System.Drawing.Image objects
FontsThe 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, DragLeave and DragDrop events, 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 PageView or Normal, 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:

Images and Text Frames and Shapes show how to work with them today.

Saving Images and Fonts

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

ClassPropertiesMethods
ButtonBarBorderStyle, ButtonOffsets, ButtonPositions, ButtonSeparators, ButtonStyle, DisplayColorsResetButtonOffsets, ResetButtonPositions, ResetButtonSeparators, ResetDisplayColors
ButtonBar.ColorsBackColor, ButtonBackColorBottom, ButtonBackColorMiddle, ButtonBackColorTop, ButtonFrameColor, ButtonHotTrackBottom, ButtonHotTrackTop, ButtonPressedBottom, ButtonPressedTop, ButtonSelectedBottom, ButtonSelectedTop, ComboBoxBackColor, ForeColor, GradientBackColor, SeparatorColorDark, SeparatorColorLightResetBackColor, ResetButtonBackColorBottom, ResetButtonBackColorMiddle, ResetButtonBackColorTop, ResetButtonFrameColor, ResetButtonHotTrackBottom, ResetButtonHotTrackTop, ResetButtonPressedBottom, ResetButtonPressedTop, ResetButtonSelectedBottom, ResetButtonSelectedTop, ResetComboBoxBackColor, ResetForeColor, ResetGradientBackColor, ResetSeparatorColorDark, ResetSeparatorColorLight
FrameBaseAlignment, ID, InsertionMode, Location, Moveable, Name, Size, Sizeable, TextDistances, TextPosition
ImageCollectionExportFilters, ImportFiltersAdd, CopyTo, GetItem, Remove
RulerBarDisplayColorsResetDisplayColors
RulerBar.ColorsBackColor, ForeColor, GradientBackColor, RulerColor, SeparatorColorDark, SeparatorColorLightResetBackColor, ResetForeColor, ResetGradientBackColor, ResetRulerColor, ResetSeparatorColorDark, ResetSeparatorColorLight
SaveSettingsImageExportFilterIndex, ImageSaveMode
ServerTextControlGetSupportedFonts
StatusBarDisplayColorsResetDisplayColors
StatusBar.ColorsBackColor, ForeColor, FrameColor, GradientBackColorResetBackColor, ResetForeColor, ResetFrameColor, ResetGradientBackColor
TextControlAllowDrag, AllowDrop, DisplayColors, DropFormatsGetSupportedFonts, ResetDisplayColors
TextControl.ColorsDarkShadowColor, DesktopColor, LightShadowColorResetDarkShadowColor, ResetDesktopColor, ResetLightShadowColor
TextFrameCollectionGetItem

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.