Programming Formatted Textparts

A TX Text Control document consists of the document's main text and additional pieces of text like text frames and headers and footers. To provide easy access to all of these text parts TX Text Control offers the TextPartCollection class. An instance of this class contains all text parts in a TX Text Control document. A text part can either be the document's main text, a text frame or a header or footer. A text frame is represented through a TextFrame object, a header or footer through a HeaderFooter object and the document's main text is represented through a MainText object. A TextPartCollection object contains all these objects in a geometric order. The first object in the collection is the main text, followed by all text frames in geometric order. At the end of the collection all headers and footers are contained also geometrically ordered. All objects in a text part collection implement the IFormattedText interface. The collection can be obtained with the TextControl.TextParts, WPF.TextControl.TextParts or ServerTextControl.TextParts property. The collection provides an Activate method to set the current input position to a certain text part and the GetItem method to get the currently activated part. Additionally, a programmer can define smaller parts called subtextparts to perform operations on smaller pieces of text. A SubTextPart can be defined through a start character index and a length or through a selection. All subtextparts are contained in a SubTextPartCollection which can be obtained with the TextControl.SubTextParts, TextFrame.SubTextParts or HeaderFooter.SubTextParts property. The collection can be used to add or to remove a subtextpart. A SubTextPart can be programmatically identified through a name or an identifier and it can be highlighted on the screen either permanently or only when it contains the current text input position. Each subtextpart can contain further nested subtextparts, but subtextparts cannot overlap. Its contents can be saved in a byte array or a string with all formats which TX Text Control supports. The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document. A single text part has lines, paragraphs, characters and a selection which can be used to assign character and paragraph formatting attributes to a piece of text. Additionally, a text part can contain tables, images, text fields, hypertext links and misspelled words. The following classes implement this interface: TextControl, ServerTextControl, WPF.TextControl, TextFrame, HeaderFooter and MainText. A common collection containing all images, text frames and charts of a document is the FrameCollection. It can be obtained with the TextControl.Frames, WPF.TextControl.Frames or ServerTextControl.Frames property. It can be used to alter common attributes or to get the currently selected item. The objects in this collection are of the type Image, TextFrame, ChartFrame, DrawingFrame or BarcodeFrame.

Classes

Class Description
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection An instance of the DataColumnInfoCollection class contains all data columns of a data table in a data source represented through objects of the type DataColumnInfo.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection An instance of the DataRelationInfoCollection class contains all data relations in a data source represented through objects of the type DataRelationInfo.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection An instance of the DataTableInfoCollection class contains all data tables in a data source represented through objects of the type DataTableInfo.
TXTextControl.FrameCollection An instance of the FrameCollection class contains all images, text frames and charts in a document.
TXTextControl.FrameEventArgs The FrameEventArgs class provides data for all events that occur with frames.
TXTextControl.IFormattedText The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document.
TXTextControl.MainText The MainText class represents the main text of a TX Text Control document.
TXTextControl.SubTextPart A SubTextPart object represents a user-defined part of a TX Text Control document.
TXTextControl.SubTextPartCollection Contains all subtextparts in the main text or another main part of a document.
TXTextControl.SubTextPartEventArgs The SubTextPartEventArgs class provides data for the TextControl.SubTextPartClicked, TextControl.SubTextPartDoubleClicked, TextControl.SubTextPartEntered and TextControl.SubTextPartLeft events.
TXTextControl.TextPartCollection An instance of the TextPartCollection class contains all text parts in a TX Text Control document.

Properties

Property Description
TXTextControl.ServerTextControl.Frames Gets a collection of all images, textframes, charts and barcodes in a document.
TXTextControl.ServerTextControl.SubTextParts Gets a collection of all subtextparts contained in the document.
TXTextControl.ServerTextControl.TextParts Gets a collection of all text parts the current document contains.
TXTextControl.TextControl.Frames Gets a collection of all images, textframes, charts, barcodes and drawings contained in the text part with the input focus.
TXTextControl.TextControl.SubTextParts Gets a collection of all subtextparts contained in the text part with the input focus.
TXTextControl.TextControl.TextParts Gets a collection of all main text parts the current document contains.
TXTextControl.WPF.TextControl.Frames Gets a collection of all images, textframes, barcodes and drawings contained in the text part with the input focus.
TXTextControl.WPF.TextControl.SubTextParts Gets a collection of all subtextparts contained in the text part with the input focus.
TXTextControl.WPF.TextControl.TextParts Gets a collection of all main text parts the current document contains.

Methods

Method Description
TXTextControl.TextControl.OnFrameClicked Raises the FrameClicked event.
TXTextControl.TextControl.OnFrameDeselected Raises the FrameDeselected event.
TXTextControl.TextControl.OnFrameDoubleClicked Raises the FrameDoubleClicked event.
TXTextControl.TextControl.OnFrameLayoutChanged Raises the FrameLayoutChanged event.
TXTextControl.TextControl.OnFrameMoved Raises the FrameMoved event.
TXTextControl.TextControl.OnFrameRightClicked Raises the FrameRightClicked event.
TXTextControl.TextControl.OnFrameSelected Raises the FrameSelected event.
TXTextControl.TextControl.OnFrameSized Raises the FrameSized event.
TXTextControl.TextControl.OnSubTextPartClicked Raises the SubTextPartClicked event.
TXTextControl.TextControl.OnSubTextPartDoubleClicked Raises the SubTextPartDoubleClicked event.
TXTextControl.TextControl.OnSubTextPartEntered Raises the SubTextPartEntered event.
TXTextControl.TextControl.OnSubTextPartLeft Raises the SubTextPartLeft event.
TXTextControl.TextControl.OnTextFrameAppearanceChanged Raises the TextFrameAppearanceChanged event.
TXTextControl.WPF.TextControl.OnFrameClicked Raises the FrameClicked event.
TXTextControl.WPF.TextControl.OnFrameDeselected Raises the FrameDeselected event.
TXTextControl.WPF.TextControl.OnFrameDoubleClicked Raises the FrameDoubleClicked event.
TXTextControl.WPF.TextControl.OnFrameLayoutChanged Raises the FrameLayoutChanged event.
TXTextControl.WPF.TextControl.OnFrameMoved Raises the FrameMoved event.
TXTextControl.WPF.TextControl.OnFrameRightClicked Raises the FrameRightClicked event.
TXTextControl.WPF.TextControl.OnFrameSelected Raises the FrameSelected event.
TXTextControl.WPF.TextControl.OnFrameSized Raises the FrameSized event.
TXTextControl.WPF.TextControl.OnSubTextPartClicked Raises the SubTextPartClicked event.
TXTextControl.WPF.TextControl.OnSubTextPartDoubleClicked Raises the SubTextPartDoubleClicked event.
TXTextControl.WPF.TextControl.OnSubTextPartEntered Raises the SubTextPartEntered event.
TXTextControl.WPF.TextControl.OnSubTextPartLeft Raises the SubTextPartLeft event.
TXTextControl.WPF.TextControl.OnTextFrameAppearanceChanged Raises the TextFrameAppearanceChanged event.

Events

Event Description
TXTextControl.TextControl.FrameClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been clicked on.
TXTextControl.TextControl.FrameDeselected Occurs when a frame (image, text frame, chart, barcode or drawing) has been deselected.
TXTextControl.TextControl.FrameDoubleClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been doubleclicked on.
TXTextControl.TextControl.FrameLayoutChanged Occurs when the layout of a frame (image, text frame, chart, barcode or drawing) has been changed.
TXTextControl.TextControl.FrameMoved Occurs when a frame (image, text frame, chart, barcode or drawing) has been moved.
TXTextControl.TextControl.FrameRightClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been clicked on with the right mouse button.
TXTextControl.TextControl.FrameSelected Occurs when a frame (image, text frame, chart, barcode or drawing) has been selected.
TXTextControl.TextControl.FrameSized Occurs when a frame (image, text frame, chart, barcode or drawing) has been sized.
TXTextControl.TextControl.SubTextPartClicked Occurs when a subtextpart has been clicked on.
TXTextControl.TextControl.SubTextPartDoubleClicked Occurs when a subtextpart has been double-clicked on.
TXTextControl.TextControl.SubTextPartEntered Occurs when the current input position has been moved to a position that belongs to a subtextpart.
TXTextControl.TextControl.SubTextPartLeft Occurs when the current input position has left a subtextpart.
TXTextControl.WPF.TextControl.FrameClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been clicked on.
TXTextControl.WPF.TextControl.FrameDeselected Occurs when a frame (image, text frame, chart, barcode or drawing) has been deselected.
TXTextControl.WPF.TextControl.FrameDoubleClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been doubleclicked on.
TXTextControl.WPF.TextControl.FrameLayoutChanged Occurs when the layout of a frame (image, text frame, chart, barcode or drawing) has been changed.
TXTextControl.WPF.TextControl.FrameMoved Occurs when a frame (image, text frame, chart, barcode or drawing) has been moved.
TXTextControl.WPF.TextControl.FrameRightClicked Occurs when a frame (image, text frame, chart, barcode or drawing) has been clicked on with the right mouse button.
TXTextControl.WPF.TextControl.FrameSelected Occurs when a frame (image, text frame, chart, barcode or drawing) has been selected.
TXTextControl.WPF.TextControl.FrameSized Occurs when a frame (image, text frame, chart, barcode or drawing) has been sized.
TXTextControl.WPF.TextControl.SubTextPartClicked Occurs when a subtextpart has been clicked on.
TXTextControl.WPF.TextControl.SubTextPartDoubleClicked Occurs when a subtextpart has been double-clicked on.
TXTextControl.WPF.TextControl.SubTextPartEntered Occurs when the current input position has been moved to a position that belongs to a subtextpart.
TXTextControl.WPF.TextControl.SubTextPartLeft Occurs when the current input position has left a subtextpart.