New Features and Update Notes

TX Text Control 15.1 provides the following new features:

Drag&Drop

A Text Control has now a built-in Drag&Drop functionality. The TextControl.AllowDrop property installs the control as a target for data the user drags onto it and the TextControl.AllowDrag property enables the control as a source of a Drag&Drop operation. A TextControl accepts text formatted as Rich Text Format, HTML Format or plain text and images formatted as device dependent or device independent bitmaps, TIFF images or Windows metafiles. Other formats like files must be furthermore handled in the control's DragEnter, DragOver, DragLeave and DragDrop events, because the control does not know how the application handles files. If the user moves the cursor over the control, it shows the insertion point where the data is inserted with a non-blinking caret. By default text is moved through Drag&Drop, pressing the CTRL key, text is copied. The ESC key cancels an operation. The formats the control accepts through a drop can be set with the TextControl.DropFormats property.

Images and Text Frames

Images and text frames can have an identifier and/or a name, which can be set with FrameBase.ID and FrameBase.Name properties. The ImageCollection.GetItem and the TextFrameCollection.GetItem methods can be used to look for an image or text frame with a given id or name. The InsertionMode and Location properties of images and text frames have been extended with a Set method, so that these properties can be altered. An Alignment property has been added for images and text frames which are anchored to a paragraph.

Display Colors

The colors which TX Text Control uses for the display elements of the tool bars and the text control can now be changed when for the control the ColorScheme border style has been set. By default the controls have a fixed color table for the standard Windows themes. Supported standard themes are the Windows XP standard theme: luna.msstyles (colors: Blue (NormalColor), Olive Green (Homestead), Silver (Metallic)), the Windows XP Media Center Edition standard theme: royale.msstyles (colors: NormalColor and Royale) and the Windows Vista and Windows 7 standard theme: aero.msstyles(colors: NormalColor). For all other themes the default colors depend on theme colors. If no theme is selected, the default colors depend on system colors. The TextControl.DisplayColors, ButtonBar.DisplayColors, RulerBar.DisplayColors and StatusBar.DisplayColors properties can be used to individually design the controls' colors.

Saving Images

With the SaveSettings.ImageSaveMode and SaveSettings.ImageExportFilterIndex properties all images of the document can be exported in a certain format and saving mode. The technical article Loading and Saving Images gives an overview how to export images.

Unlimited Zoom Factor

The ZoomFactor of a TextControl is no longer limited to 400 percent, when the ViewMode property has been set to PageView or Normal. For the other modes the zoom factor is furthermore limited to 400 percent.

Mouse Wheel

The functionality of the mouse wheel has been extended. Pressing the SHIFT key scrolls the visual part of the document horizontally and pressing the CONTROL key zooms the document.

Supported Fonts

The new GetSupportedFonts method returns an array of strings specifying the names of all currently supported fonts. These fonts depend on the formatting device set with the FormattingPrinter property.

Inserting Images

A new Image constructor accepts a System.Drawing.Image object, which is used to initialize the TXTextcontrol.Image object.

FrameBase.Location Property

This property can now be used to set the location of an image or text frame.

Image.InsertionMode Property

This property can now be used to set the insertion mode of an image programatically.

TextFrame.InsertionMode Property

This property can now be used to set the insertion mode of a text frame programatically.