InsertionMode Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
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; }Public Property InsertionMode As FrameInsertionModeMembers
| Value | Description |
|---|---|
| AsCharacter | The frame is inserted in the text as a single character. |
| DisplaceCompleteLines | The frame is inserted at a certain geometrical location. The text stops at the top and continues at the bottom of the frame. |
| DisplaceText | The 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. |
| AboveTheText | The frame is inserted at a certain geometrical location above the text. This means that the frame overwrites the text. |
| BelowTheText | The frame is inserted at a certain geometrical location below the text. This means that the text overwrites the frame. |
| MoveWithText | The frame is connected with a paragraph and moved with the text. |
| FixedOnPage | The 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}");Dim callout As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout" }
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText)
Dim frameBase As 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.