# Stylesheet Formatting

> Apply formatting styles in TXTextControl with StyleCurrent, open the style dialog box with StyleDialog and handle the StyleChanged and StyleListChanged events.

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

---

Formatting styles are named sets of character or paragraph attributes. `TXTextControl` exposes the style at the input position, a dialog box for creating, deleting and modifying styles and two events: one when the input position moves to text of another style, one when styles are added or removed.

![The built-in Styles dialog box with the Modify Style dialog box open on top, showing the name, base style, following style, style type and the Font, Paragraph, Tabs and Numbering buttons, in the look of TX Text Control 10](https://docs.textcontrol.com/assets/img/tx-text-control-activex/modify-style-dialog.c178f186.webp)

To create and change styles in code, use the `Style` and `Styles` objects described under [Stylesheet Programming](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms-full.txt).

### Properties

| Member | Description |
|---|---|
| [`TXTextControl.StyleCurrent`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/stylecurrent-property/llms-full.txt) | Returns or sets the formatting style at the current input position or, if text is selected, changes all styles of the selected text to the specified style. |

### Methods

| Member | Description |
|---|---|
| [`TXTextControl.StyleDialog`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/styledialog-method/llms-full.txt) | Invokes the `TXTextControl`'s built-in dialog box for creating, deleting and modifying formatting styles. |

### Events

| Member | Description |
|---|---|
| [`TXTextControl.StyleChanged`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/stylechanged-event/llms-full.txt) | Occurs after the character input position has been moved to a text part formatted with another style. |
| [`TXTextControl.StyleListChanged`](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/stylelistchanged-event/llms-full.txt) | Occurs after one or more formatting styles have been added or removed. |

### Related Pages

- [Stylesheet Programming](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms-full.txt): the Style and Styles objects for styles in code.
- [Character Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/character-formatting/llms-full.txt): fonts, sizes, styles, colors and spacing of characters.
- [Paragraph Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/paragraph-formatting/llms-full.txt): alignment, indents, spacing, tabs and frames of paragraphs.

---

## Nearby

- **Previous:** [Sections and Pages](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/sections-pages/llms-full.txt)
- **Next:** [Stylesheet Programming](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/stylesheet-programming/llms-full.txt)
