TX Text Control .NET for Windows Forms

InsertionMode Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page.

Syntax

public FrameInsertionMode InsertionMode { get; set; }

Members

ValueDescription
AsCharacterThe frame is inserted in the text as a single character.
DisplaceCompleteLinesThe frame is inserted at a certain geometrical location. The text stops at the top and continues at the bottom of the frame.
DisplaceTextThe frame is inserted at a certain geometrical location. The text flows around the frame and empty areas at the left and right side are filled.
AboveTheTextThe frame is inserted at a certain geometrical location above the text. This means that the frame overwrites the text.
BelowTheTextThe frame is inserted at a certain geometrical location below the text. This means that the text overwrites the frame.
MoveWithTextThe frame is connected with a paragraph and moved with the text.
FixedOnPageThe frame is fixed positioned on a page.

Examples

The following example adds a callout frame and works with it through the common frame API by using FrameBase.InsertionMode.

TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
FrameBase frameBase = callout;

frameBase.InsertionMode = FrameInsertionMode.AsCharacter;
Console.WriteLine($"Insertion Mode used by Frame Base: {frameBase.InsertionMode}");

Remarks

The values of the FrameInsertionMode enumeration can be combined. The following combinations are possible:

DisplaceCompleteLines and MoveWithText

DisplaceCompleteLines and FixedOnPage

DisplaceText and MoveWithText

DisplaceText and FixedOnPage

AboveTheText and MoveWithText

AboveTheText and FixedOnPage

BelowTheText and MoveWithText

BelowTheText and FixedOnPage

AsCharacter

For all other combinations an exception is thrown.

Further Reading