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 and 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, MainText, FootnoteSection and FootnoteText. 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.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.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 SubTextPartClicked, SubTextPartCreated, SubTextPartDeleted, SubTextPartDoubleClicked, SubTextPartEntered and SubTextPartLeft events.
TXTextControl.TextPartCollection An instance of the TextPartCollection class contains all text parts in a TX Text Control document.
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.

Constructors

Constructor Description
TXTextControl.SubTextPart Initializes a new instance of the SubTextPart class.

Enumerations

Enumeration Description
TXTextControl.SubTextPartCollection.AddResult Specifies the result when a subtextpart has been added to the document.

Events

Event Description
TXTextControl.ServerTextControl.SubTextPartCreated Occurs when a subtextpart has been created.
TXTextControl.ServerTextControl.SubTextPartDeleted Occurs when a subtextpart has been deleted.
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.SubTextPartCreated Occurs when a subtextpart has been created.
TXTextControl.WPF.TextControl.SubTextPartDeleted Occurs when a subtextpart has been deleted.
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.

Interfaces

Interface Description
TXTextControl.IFormattedText The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document.

Methods

Method Description
TXTextControl.FrameCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.FrameCollection.GetItem Gets a particular image, text frame, chart, barcode or drawing from the collection.
TXTextControl.FrameCollection.Remove Removes a frame (image, text frame, chart, barcode or drawing) from a document.
TXTextControl.IFormattedText.Find Finds a text string in the text part.
TXTextControl.IFormattedText.GetTextFields Returns a collection containing text fields of the specified types.
TXTextControl.ServerTextControl.OnSubTextPartCreated Raises the SubTextPartCreated event.
TXTextControl.ServerTextControl.OnSubTextPartDeleted Raises the SubTextPartDeleted event.
TXTextControl.SubTextPart.GetChildren Returns an array of SubTextPart objects which are the children of this SubTextPart.
TXTextControl.SubTextPart.GetTextFields Returns an array of TextField objects which are completely contained in this SubTextPart.
TXTextControl.SubTextPart.Save Saves the subtextpart's text with the specified format.
TXTextControl.SubTextPart.ScrollTo Sets the current input position to the beginning of a subtextpart and scrolls it into the visible part of the document.
TXTextControl.SubTextPartCollection.Add Adds a new subtextpart to the document.
TXTextControl.SubTextPartCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.SubTextPartCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.SubTextPartCollection.GetItem Gets a particular subtextpart from the collection.
TXTextControl.SubTextPartCollection.Remove Removes a subtextpart from the collection including all its nested subtextparts.
TXTextControl.TextPartCollection.Activate Sets the input focus to the specified text part.
TXTextControl.TextPartCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.TextPartCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.TextPartCollection.GetItem Gets a certain text part from the collection.
TXTextControl.TextPartCollection.GetMainText Gets the main text part of the document.
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
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.OnSubTextPartCreated Raises the SubTextPartCreated event.
TXTextControl.WPF.TextControl.OnSubTextPartDeleted Raises the SubTextPartDeleted 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.

Properties

Property Description
TXTextControl.FrameEventArgs.Frame Gets an object that represents the frame which causes the event.
TXTextControl.IFormattedText.ApplicationFields Gets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document.
TXTextControl.IFormattedText.Barcodes Gets a collection of all barcodes in the text part.
TXTextControl.IFormattedText.Comments Gets a collection of all comments in the text part.
TXTextControl.IFormattedText.DocumentLinks Gets a collection of all links in the text part which point to targets in the same document.
TXTextControl.IFormattedText.DocumentTargets Gets a collection of all targets in the text part.
TXTextControl.IFormattedText.Drawings Gets a collection of all drawings in the text part.
TXTextControl.IFormattedText.EditableRegions Gets a collection of all editable regions in the text part.
TXTextControl.IFormattedText.FormFields Gets a collection of all form fields in the text part.
TXTextControl.IFormattedText.Frames Gets a collection of all images, textframes, charts, barcodes and drawings in the text part.
TXTextControl.IFormattedText.HypertextLinks Gets a collection of all hypertext links in the text part.
TXTextControl.IFormattedText.Images Gets a collection of all images in the text part.
TXTextControl.IFormattedText.Lines Gets a collection of all lines the text in the text part consists of.
TXTextControl.IFormattedText.MisspelledWords Gets a collection of all misspelled words in the text part.
TXTextControl.IFormattedText.Paragraphs Gets a collection of all paragraphs the text in the text part consists of.
TXTextControl.IFormattedText.Selection Gets or sets the current selection in the text part.
TXTextControl.IFormattedText.SubTextParts Gets a collection of all subtextparts in the text part.
TXTextControl.IFormattedText.Tables Gets a collection of all tables in the text part.
TXTextControl.IFormattedText.TablesOfContents Gets a collection of all tables of contents.
TXTextControl.IFormattedText.TextChars Gets a collection of all characters the text in the text part consists of.
TXTextControl.IFormattedText.TextFields Gets a collection of all standard text fields in the text part.
TXTextControl.IFormattedText.TrackedChanges Gets a collection of all tracked changes made in the text part.
TXTextControl.MainText.Charts Gets a collection of all charts contained in the main text of the document.
TXTextControl.MainText.TextFrames Gets a collection of all text frames contained in the main text of the document.
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.SubTextPart.Data Gets or sets additional data of the subtextpart.
TXTextControl.SubTextPart.HighlightColor Gets or sets the highlight color for the subtextpart.
TXTextControl.SubTextPart.HighlightMode Gets or sets a value indicating when the subtextpart is highlighted.
TXTextControl.SubTextPart.ID Gets or sets the subtextpart's identifier.
TXTextControl.SubTextPart.Length Gets the number of characters which belong to the subtextpart.
TXTextControl.SubTextPart.Name Gets or sets the name of the subtextpart.
TXTextControl.SubTextPart.NestedLevel Gets the subtextpart's nested level.
TXTextControl.SubTextPart.Number Gets the subtextpart's number.
TXTextControl.SubTextPart.OuterSubTextPart Gets a subtextpart's outer subtextpart.
TXTextControl.SubTextPart.OuterMostSubTextPart Gets a subtextpart's outermost subtextpart.
TXTextControl.SubTextPart.Start Gets the index (one-based) of the first character which belongs to the subtextpart.
TXTextControl.SubTextPart.Text Gets the subtextpart's text.
TXTextControl.SubTextPartCollection.Count Gets the number of elements contained in the collection.
TXTextControl.SubTextPartCollection.IsSynchronized Returns true if the collection is designed to be thread safe, otherwise, it returns false.
TXTextControl.SubTextPartCollection.Item Gets the subtextpart with the specified number from the collection.
TXTextControl.SubTextPartCollection.SyncRoot Gets an object that can be used to synchronize access to the collection.
TXTextControl.SubTextPartEventArgs.SubTextPart Gets an object that represents the subtextpart which causes the event.
TXTextControl.TextPartCollection.Count Gets the number of elements contained in the collection.
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection.Count Gets the number of elements contained in the collection.
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection.Item Gets the DataColumnInfo instance with the specified 0-based index from the collection.
TXTextControl.DocumentServer.DataSources.DataColumnInfoCollection.IsReadOnly Gets a value indicating whether the collection is read only.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection.Count Gets the number of elements contained in the collection.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection.Item Gets the DataRelationInfo instance with the specified 0-based index from the collection.
TXTextControl.DocumentServer.DataSources.DataRelationInfoCollection.IsReadOnly Gets a value indicating whether the collection is read only.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection.Count Gets the number of elements contained in the collection.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection.IsReadOnly Gets a value indicating whether the collection is read only.
TXTextControl.DocumentServer.DataSources.DataTableInfoCollection.Item Gets a DataTableInfo instance from the collection.
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.