TX Text Control .NET Documentation

InlineStyle Class

The InlineStyle class defines a formatting style that can be used to format single words in a line of text. In addition to the methods described here, it inherits all properties and methods of the FormattingStyle class.

Syntax:
[C#] public sealed class InlineStyle : FormattingStyle
[Visual Basic] Public NotInheritable Class InlineStyle Inherits FormattingStyle
Introduced:10.1

Constructors

ConstructorDescription
InlineStyleInitializes a new instance of the InlineStyle class.

Properties

PropertyDescription
BaselineGets or sets the baseline alignment, in twips, of the style.

BoldGets or sets the bold attribute of the style.

FontNameGets or sets the font of the style.

FontSizeGets or sets the font's size of the style.

ForeColorGets or sets the style's color used to display the text.

ItalicGets or sets the italic attribute of the style.

NameGets or sets the name of the style.

StrikeoutGets or sets the strikeout attribute of the style.

TextBackColorGets or sets the style's text background color.

UnderlineGets or sets underlining styles for the style.

Methods

MethodDescription
ApplyApplies all set attributes of the style to the current document.

IsInheritedFromParagraphInforms about whether one or more of the style's attributes are inherited from the surrounding paragraph.

ResetToParagraphResets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.

Enumerations

EnumerationDescription
AttributesDetermines the style's attributes.

Example:The following example shows how to add and apply an InlineStyle.
[C#] textControl1.Text = "TX Text Control"; TXTextControl.InlineStyle inline = new TXTextControl.InlineStyle("ArialBold16"); inline.Bold = true; inline.FontSize = 320; inline.FontName = "Arial"; textControl1.InlineStyles.Add(inline); textControl1.Select(3, 4); textControl1.Selection.FormattingStyle = "ArialBold16";
[Visual Basic] TextControl1.Text = "TX Text Control" Dim inline As TXTextControl.InlineStyle = New TXTextControl.InlineStyle("ArialBold16") inline.Bold = True inline.FontSize = 320 inline.FontName = "Arial" TextControl1.InlineStyles.Add(inline) TextControl1.Select(3, 4) TextControl1.Selection.FormattingStyle = "ArialBold16"
See also:Stylesheet Programming, Graphical Overview.