# TextPartCollection Class

> An instance of the Web.TextPartCollection class contains all text parts in a TX Text Control document. A text part can either be the document's main text, a text frame or a header or footer. A text frame is represented through a Web.TextFrame object, a header or footer through a Web.HeaderFooter object and the document's main text is represented through a Web.MainText object. A Web.TextPartCollection object contains all these objects in a geometric order. The first object in the collection is the main text, followed by all text frames in geometric order. At the end of the collection all headers and footers are contained also geometrically ordered. All objects in a text part collection implement the Web.IFormattedText interface. The collection can be obtained with the Web.TextControl.TextParts property. The Web.TextPartCollection class implements the interface ICollection<Web.IFormattedText>.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 22.0
- **Namespace:** `TXTextControl.Web`
- **Package:** `TXTextControl.Web` (assembly `TXTextControl.Web.DocumentEditor.dll`, from nuget.org, the private NuGet feed or Text Control Offline Packages)
- **Implements:** `System.Collections.Generic.ICollection<TXTextControl.Web.IFormattedText>`, `System.Collections.Generic.IEnumerable<TXTextControl.Web.IFormattedText>`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.Web > TextPartCollection Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/#members)

---

## In This Section

- [TextPartCollection.Activate Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/activate-method/llms.txt): Sets the input focus to the specified text part. If the activated text part is not in the visible part of the document, the document is scrolled.

---

## Nearby

- **Previous:** [TextPart.Selection Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpart/selection-property/llms.txt)
- **Next:** [TextPartCollection.Activate Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textpartcollection/activate-method/llms.txt)
