TXTextControl.ParagraphFormat class

An instance of the ParagraphFormat class represents the formatting attributes of a paragraph.

Syntax

[C#]
public class ParagraphFormat
[Visual Basic]
Public Class ParagraphFormat

Constructors

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

Properties

Property Description
AbsoluteLineSpacing Gets or sets the line spacing of a paragraph in twips.
Alignment Gets or sets the horizontal text alignment.
BackColor Gets or sets the background color of a paragraph.
BottomDistance Gets or sets the bottom distance, in twips, between this and the next paragraph.
Direction Gets or sets the writing direction.
Frame Gets or sets a frame around the paragraph.
FrameDistance Gets or sets the distance, in twips, between the text and the paragraph's frame.
FrameLineColor Gets or sets the color used for the frame lines of a paragraph.
FrameLineWidth Gets or sets the line width, in twips, of the paragraph's frame.
FrameStyle Gets or sets the style of the paragraph's frame.
HangingIndent Gets or sets the distance, in twips, for the hanging indent.
Justification Gets or sets the kind of justification in documents containing Arabic or Hebrew characters.
KeepLinesTogether Gets or sets a value indicating whether a page break is allowed within the paragraph.
KeepWithNext If this property is set to true, the paragraph is displayed on the same page as its following paragraph.
LeftIndent Gets or sets the distance, in twips, between the left edge of the Text Control and the left edge of the text.
LineSpacing Specifies the line spacing of a paragraph as a percentage of the font size.
PageBreakBefore If this property is set to true, the paragraph is always displayed on top of a page.
RightIndent Gets or sets the distance, in twips, between the right edge of a Text Control document and the right edge of the text.
TabPositions Gets or sets an array containing the absolute tab stop positions, in twips, in a paragraph.
TabTypes Gets or sets an array containing the tab types in a paragraph.
TopDistance Gets or sets a top distance, in twips, between this and the previous paragraph.
WidowOrphanLines Gets or sets the number of lines for widow/orphan control.

Enumerations

Enumeration Description
Attribute Determines a certain paragraph format attribute.

Fields

Field Description
MaxTabs Represents the maximum number of tabs in a line.

Example

The following example shows how to add a specific paragraph format to the current paragraph. The text will be centered and a boxed frame is displayed.

[C#]
TXTextControl.ParagraphFormat format = new TXTextControl.ParagraphFormat();
format.Alignment = TXTextControl.HorizontalAlignment.Center;
format.Frame = TXTextControl.Frame.Box;
format.FrameStyle = TXTextControl.FrameStyle.Double;

textControl1.Selection.ParagraphFormat = format;
[Visual Basic]
Dim format As TXTextControl.ParagraphFormat = New TXTextControl.ParagraphFormat()
format.Alignment = TXTextControl.HorizontalAlignment.Center
format.Frame = TXTextControl.Frame.Box
format.FrameStyle = TXTextControl.FrameStyle.Double

TextControl1.Selection.ParagraphFormat = format

See Also