TX Text Control .NET for Windows Forms Documentation

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

ConstructorDescription
ParagraphFormatInitializes a new instance of the ParagraphFormat class.

Properties

PropertyDescription
AbsoluteLineSpacingGets or sets the line spacing of a paragraph in twips.
AlignmentGets or sets the horizontal text alignment.
BottomDistanceGets or sets the bottom distance, in twips, between this and the next paragraph.
FrameGets or sets a frame around the paragraph.
FrameDistanceGets or sets the distance, in twips, between the text and the paragraph's frame.
FrameLineWidthGets or sets the line width, in twips, of the paragraph's frame.
FrameStyleGets or sets the style of the paragraph's frame.
HangingIndentGets or sets the distance, in twips, for the hanging indent.
KeepLinesTogetherGets or sets a value indicating whether a page break is allowed within the paragraph.
KeepWithNextIf this property is set to true, the paragraph is displayed on the same page as its following paragraph.
LeftIndentGets or sets the distance, in twips, between the left edge of the Text Control and the left edge of the text.
LineSpacingSpecifies the line spacing of a paragraph as a percentage of the font size.
PageBreakBeforeIf this property is set to true, the paragraph is always displayed on top of a page.
RightIndentGets or sets the distance, in twips, between the right edge of a Text Control document and the right edge of the text.
TabPositionsGets or sets an array containing the absolute tab stop positions, in twips, in a paragraph.
TabTypesGets or sets an array containing the tab types in a paragraph.
TopDistanceGets or sets a top distance, in twips, between this and the previous paragraph.
WidowOrphanLinesGets or sets the number of lines for widow/orphan control.

Enumerations

EnumerationDescription
AttributeDetermines a certain paragraph format attribute.

Fields

FieldDescription
MaxTabsRepresents 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

 
 
 

Products

Support

Downloads

Corporate

Buy Now