# Modifying Styles in TX Text Control ActiveX

> TX Text Control .NET for Windows Forms exposes FormattingStyle as the base class for InlineStyle and ParagraphStyle. In the ActiveX edition, the Style object and Styles collection let developers retrieve a named style, modify its font attributes, and call Apply to commit.

- **Author:** Bjoern Meyer
- **Published:** 2006-01-27
- **Modified:** 2026-07-17
- **Description:** TX Text Control .NET for Windows Forms exposes FormattingStyle as the base class for InlineStyle and ParagraphStyle. In the ActiveX edition, the Style object and Styles collection let developers retrieve a named style, modify its font attributes, and call Apply to commit.
- **2 min read** (202 words)
- **Tags:**
  - ActiveX
  - Sample
- **Web URL:** https://www.textcontrol.com/blog/2006/01/27/modifying-styles-in-tx-text-control-activex/
- **LLMs URL:** https://www.textcontrol.com/blog/2006/01/27/modifying-styles-in-tx-text-control-activex/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2006/01/27/modifying-styles-in-tx-text-control-activex/llms-full.txt

---

TX Text Control .NET for Windows Forms offers extensive classes to modify document styles. The [FormattingStyle](
https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.formattingstyle.class.htm "FormattingStyle class") class is the base class for the two different supported style classes: [InlineStyle](
https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.inlinestyle.class.htm "Inline style class") and [ParagraphStyle](
https://docs.textcontrol.com/textcontrol/windows-forms/ref.txtextcontrol.paragraphstyle.class.htm "Paragraph style class"). These classes can be used to change the styles.

TX Text Control ActiveX offers a [Style](https://www.textcontrol.com/ "Style object") object that represents a formatting style. The [Styles](https://www.textcontrol.com/ "Styles collection") collection represents all formatting styles a TX Text Control document contains. A common task is to access an existing style and to change some attributes.

Consider a style with the name *Headline*. To modify this style, the *Item* method must be called with the name of the style. After that, the properties of the *Style* object can be modified. Then, the modifications and the *Apply* method must be used to confirm the changes. The following sample code shows this in detail.

```
Set style = TXTextControl1.Styles.Item("Headline")
style.FontName = "Arial"
style.FontSize = 400
style.Apply
```

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [How to Get the Last Line in TX Text Control ActiveX](https://www.textcontrol.com/blog/2009/01/13/how-to-get-the-last-line-in-tx-text-control-activex/llms.txt)
- [FontItalic on CTRL+i with TX Text Control ActiveX](https://www.textcontrol.com/blog/2006/05/02/fontitalic-on-ctrli-with-tx-text-control-activex/llms.txt)
- [Open Documents with an Offset](https://www.textcontrol.com/blog/2005/12/12/open-documents-with-an-offset/llms.txt)
- ['Change Case' in TX Text Control ActiveX](https://www.textcontrol.com/blog/2005/08/09/change-case-in-tx-text-control-activex/llms.txt)
- [Indents and Numbered Lists](https://www.textcontrol.com/blog/2005/03/23/indents-and-numbered-lists/llms.txt)
- [How to Call TX Text Control Properties from a UserControl](https://www.textcontrol.com/blog/2003/03/21/how-to-call-tx-text-control-properties-from-a-usercontrol/llms.txt)
- [How to Build a Screen Magnifier with TX Text Control](https://www.textcontrol.com/blog/2003/02/25/how-to-build-a-screen-magnifier-with-tx-text-control/llms.txt)
- [How to Programmatically Select a Whole Page](https://www.textcontrol.com/blog/2002/10/16/how-to-programmatically-select-a-whole-page/llms.txt)
- [Introducing TX Text Control 34.0: Your Next Leap in Document Processing](https://www.textcontrol.com/blog/2025/11/10/introducing-tx-text-control-34-0-your-next-leap-in-document-processing/llms.txt)
- [Expert Implementation Services for Legacy System Modernization](https://www.textcontrol.com/blog/2025/05/07/expert-implementation-services-for-legacy-system-modernization/llms.txt)
- [Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5](https://www.textcontrol.com/blog/2025/05/07/service-pack-releases-whats-new-in-tx-text-control-33-0-sp1-and-32-0-sp5/llms.txt)
- [TX Text Control 32.0 Service Pack 4 Released](https://www.textcontrol.com/blog/2024/09/02/tx-text-control-32-0-service-pack-4-released/llms.txt)
- [TX Text Control 32.0 Has Been Released](https://www.textcontrol.com/blog/2023/09/13/tx-text-control-320-has-been-released/llms.txt)
- [Create a Table of Contents in Windows Forms using C#](https://www.textcontrol.com/blog/2023/01/23/create-toc-in-windows-forms/llms.txt)
- [Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub](https://www.textcontrol.com/blog/2023/01/08/official-tx-text-control-net-sample-applications-are-now-hosted-on-github/llms.txt)
- [TX Text Control 31.0 and TX Spell .NET 10.0 Have Been Released](https://www.textcontrol.com/blog/2022/09/07/tx-text-control-31-released/llms.txt)
- [TX Text Control 30.0 and TX Spell .NET 9.0 Have Been Released](https://www.textcontrol.com/blog/2021/11/29/tx-text-control-30-released/llms.txt)
- [Detect Toggle Button Changes Using a MutationObserver](https://www.textcontrol.com/blog/2021/11/11/detect-toggle-button-changes-using-a-mutationobserver/llms.txt)
- [Two Ways to Restart Numbered Lists in TX Text Control](https://www.textcontrol.com/blog/2021/11/03/two-ways-to-restart-numbered-lists/llms.txt)
- [Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More](https://www.textcontrol.com/blog/2020/12/09/zoom-tricks-disabling-ctrl-mouse-wheel-and-more/llms.txt)
- [TX Text Control X19 and TX Spell 8.0 Have Been Released](https://www.textcontrol.com/blog/2020/12/02/tx-text-control-x19-released/llms.txt)
- [TX Text Control X18 has been Released](https://www.textcontrol.com/blog/2020/03/16/tx-text-control-x18-released/llms.txt)
- [Service Pack 1 for TX Text Control X16 Released](https://www.textcontrol.com/blog/2019/05/31/service-pack-1-for-tx-text-control-x16-released/llms.txt)
- [TX Text Control X17 has been Released](https://www.textcontrol.com/blog/2019/05/28/tx-text-control-x17-released/llms.txt)
- [Service Pack 3 for TX Text Control X15 Released](https://www.textcontrol.com/blog/2018/11/29/service-pack-3-for-tx-text-control-x15-released/llms.txt)
