TXTextControl.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.

Introduced: 10.1.

Syntax

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

Constructors

Constructor Description
InlineStyle Overloaded. Creates a new instance of the InlineStyle class.

Properties

Property Description
Baseline Gets or sets the baseline alignment, in twips, of the style. (Inherited from FormattingStyle.)
BaseStyle Gets the FormattingStyle which is the base style of this style. (Inherited from FormattingStyle.)
Bold Gets or sets the bold attribute of the style. (Inherited from FormattingStyle.)
FontName Gets or sets the font of the style. (Inherited from FormattingStyle.)
FontSize Gets or sets the font's size of the style. (Inherited from FormattingStyle.)
ForeColor Gets or sets the style's color used to display the text. (Inherited from FormattingStyle.)
Italic Gets or sets the italic attribute of the style. (Inherited from FormattingStyle.)
Name Gets or sets the name of the style. (Inherited from FormattingStyle.)
Strikeout Gets or sets the strikeout attribute of the style. (Inherited from FormattingStyle.)
TextBackColor Gets or sets the style's text background color. (Inherited from FormattingStyle.)
Underline Gets or sets underlining styles for the style. (Inherited from FormattingStyle.)

Methods

Method Description
Apply Applies all set attributes of the style to the current document. (Inherited from FormattingStyle.)
IsInheritedFromParagraph Informs about whether one or more of the style's attributes are inherited from the surrounding paragraph.
ResetToParagraph Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.

Enumerations

Enumeration Description
Attributes Determines 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