# Stylesheet Programming

> Create and change formatting styles in code with the Style object and the Styles collection, which the TXTextControl.Styles property returns.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > API Reference > Programming Categories > Stylesheet Programming
- **289 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms-full.txt

---

In code, formatting styles are OLE Automation objects. A `Styles` collection holds every style of a document, and each of its members is a `Style` object whose properties set fonts, paragraphs, frames, tabs and lists.

You get the collection from the `TXTextControl.Styles` property.

### Controls and Objects

| Member | Description |
|---|---|
| [`Style`](https://docs.textcontrol.com/tx-text-control-activex/reference/style/llms-full.txt) | A `Style` object is an OLE Automation object that represents a formatting style. |
| [`Styles`](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms-full.txt) | A `Styles` collection object is an OLE Automation object whose members represent all formatting styles a `TXTextControl` document contains. |

### Properties

| Member | Description |
|---|---|
| [`TXTextControl.Styles`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/styles-property/llms-full.txt) | Returns a collection of all formatting styles in a document. |

### Related Pages

- [Stylesheet Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-formatting/llms-full.txt): apply formatting styles and open the style dialog box.
- [Style](https://docs.textcontrol.com/tx-text-control-activex/reference/style/llms-full.txt): the members of the Style object.
- [Styles](https://docs.textcontrol.com/tx-text-control-activex/reference/styles/llms-full.txt): the members of the Styles collection.

---

## Nearby

- **Previous:** [Stylesheet Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-formatting/llms-full.txt)
- **Next:** [Built-In Dialog Boxes](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/dialog-boxes/llms-full.txt)
