InsertionMode Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
(Only for compatibility) Gets or sets a value determining whether a text frame is treated as a single character or the document's text either flows around or overwrites the text frame. If the documents text flows around or overwrites the text frame, this property also determines whether the text frame is moved with the text or fixed positioned on a page.
Syntax
public TextFrameInsertionMode InsertionMode { get; set; }Public Property InsertionMode As TextFrameInsertionModeMembers
| Value | Description |
|---|---|
| AsCharacter | The text frame is inserted in the text as a single character. |
| DisplaceCompleteLines | The text frame is inserted at a certain geometrical location. The text stops at the top and continues at the bottom of the text frame. |
| DisplaceText | The text frame is inserted at a certain geometrical location. The text flows around the text frame and empty areas at the left and right side are filled. |
| AboveTheText | The text frame is inserted at a certain geometrical location above the text. This means that the text frame overwrites the text. |
| BelowTheText | The text frame is inserted at a certain geometrical location below the text. This means that the text overwrites the text frame. |
| MoveWithText | The text frame is connected with a paragraph and moved with the text. |
| FixedOnPage | The text frame is fixed positioned on a page. |
Examples
The following example applies bold formatting through the text frame's selection by using TextFrame.InsertionMode.
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;
textFrame.InsertionMode = TextFrameInsertionMode.AsCharacter;
Console.WriteLine($"Insertion Mode used by Text Frame: {textFrame.InsertionMode}");Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection
textFrame.InsertionMode = TextFrameInsertionMode.AsCharacter
Console.WriteLine($"Insertion Mode used by Text Frame: {textFrame.InsertionMode}")Remarks
The values of the TextFrameInsertionMode 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.