# SubTextPartEventArgs.SubTextPart Property

> Gets an object that represents the subtextpart which causes the event. It is of the type SubTextPart.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 23.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > SubTextPartEventArgs.SubTextPart Property
- **334 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextparteventargs/subtextpart-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextparteventargs/subtextpart-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextparteventargs/subtextpart-property/llms-full.txt

---

### Description

Gets an object that represents the subtextpart which causes the event. It is of the type [SubTextPart](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpart/llms-full.txt).

### Syntax

```csharp
public SubTextPart SubTextPart { get; }
```

```vbnet
Public ReadOnly Property SubTextPart As SubTextPart
```

### Examples

The following example uses `SubTextPartEventArgs.SubTextPart` while handling `SubTextPartCreated`.

```csharp
textControl.SubTextPartCreated += (_, e) =>
{
    e.SubTextPart?.ScrollTo();
};
```

```vbnet
AddHandler textControl.SubTextPartCreated,
    Sub(sender, e)
        If e.SubTextPart IsNot Nothing Then e.SubTextPart.ScrollTo()
    End Sub
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [SubTextPartEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextparteventargs/llms-full.txt)
- **Next:** [Table Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/table/llms-full.txt)
