# ListFormat.MaxText Field

> Represents the maximum number of charcters for the additinal text in front and behind the number of a numbered list. The value of this constant is 20.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Field
- **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 > ListFormat.MaxText Field
- **464 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/listformat/maxtext-field/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/listformat/maxtext-field/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/listformat/maxtext-field/llms-full.txt

---

### Description

Represents the maximum number of charcters for the additinal text in front and behind the number of a numbered list. The value of this constant is 20.

### Syntax

```csharp
public const int MaxText = 20;
```

```vbnet
Public Const MaxText As Integer = 20
```

### Examples

The following example validates a custom list label before assigning it.

```csharp
string label = "Appendix ";
if (label.Length <= ListFormat.MaxText)
{
    ListFormat listFormat = textControl.Selection.ListFormat;
    listFormat.TextBeforeNumber = label;
    textControl.Selection.ListFormat = listFormat;
}
```

```vbnet
Dim label As String = "Appendix "
If label.Length <= ListFormat.MaxText Then
    Dim listFormat As ListFormat = textControl.Selection.ListFormat
    listFormat.TextBeforeNumber = label
    textControl.Selection.ListFormat = listFormat
End If
```

---

## Nearby

- **Previous:** [ListFormat.MaxLevel Field](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/listformat/maxlevel-field/llms-full.txt)
- **Next:** [ListFormat.NumberFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/listformat/numberformat-property/llms-full.txt)
