# TextFrame.InternalMargins Property

> Gets or sets the distances, in twips, between the text frame's border line and the text. The property's value is an array of four variables specifying the distances in the following order: left, top, right and bottom. If a value is set to -1, it is not changed.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextFrame.InternalMargins Property
- **566 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/internalmargins-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/internalmargins-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/internalmargins-property/llms-full.txt

---

### Description

Gets or sets the distances, in twips, between the text frame's border line and the text. The property's value is an array of four variables specifying the distances in the following order: left, top, right and bottom. If a value is set to -1, it is not changed.

### Syntax

```csharp
public int[] InternalMargins { get; set; }
```

```vbnet
Public Property InternalMargins As Integer()
```

### Examples

The following example applies bold formatting through the text frame's selection by using `TextFrame.InternalMargins`.

```csharp
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

textFrame.InternalMargins = new int[] { 10 };
if (textFrame.InternalMargins != null)
{
    Console.WriteLine("Text Frame: Internal Margins is available.");
}
```

```vbnet
Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection

textFrame.InternalMargins = New Integer() { 10 }
If textFrame.InternalMargins IsNot Nothing Then
    Console.WriteLine("Text Frame: Internal Margins is available.")
End If
```

---

## Nearby

- **Previous:** [TextFrame.InsertionMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/insertionmode-property/llms-full.txt)
- **Next:** [TextFrame.Lines Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframe/lines-property/llms-full.txt)
