Skype:TextControlSupport
Orders:877-462-4772
TX Text Control - word processing components.
« »

Modifying styles in TX Text Control ActiveX

Blogged by Björn Meyer on January 27, 2006 and tagged with ActiveX, Samples.

TX Text Control .NET offers extensive classes to modify document styles. The FormattingStyle class is the base class for the two different supported style classes: InlineStyle and ParagraphStyle. These classes can be used to change the styles.

TX Text Control ActiveX offers a Style object that represents a formatting style. The Styles 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
« Prev:15 years word processing components
» Next:Using the IsCommonValueSelected property

top

Top 10 Bestselling Product Award 2007Top 25 Publisher Product Award 2007Top 10 Bestselling Product Award 2007 in JapanTop 25 Bestselling Product Award 2006Top 25 Bestselling Publisher Award 2006Reader's Choice Award, dot.net magazin, 3rd place