TX Text Control .NET Server

ParagraphFormat Object

Object|Introduced in 26.0

Description

Represents the formatting attributes of a paragraph.

Syntax

ParagraphFormat

Examples

The following example demonstrates ParagraphFormat in a practical document-editing workflow. It represents the formatting attributes of a paragraph.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.paragraphFormat.getAbsoluteLineSpacing(
    function(result) {
        console.log("get absolute line spacing result:", result);
    },
    onTxError
);

Members

Methods

MethodDescription
getAbsoluteLineSpacingGets the line spacing of a paragraph in twips.
getAlignmentGets the horizontal text alignment.
getBackColorGets the background color of a paragraph.
getBottomDistanceGets the bottom distance, in twips, between this and the next paragraph.
getDirectionGets the writing direction.
getFrameGets the framesetting of the paragraph.
getFrameDistanceGets the distance, in twips, between the text and the paragraph's frame.
getFrameLineColorGets the color used for the frame lines of a paragraph.
getFrameLineWidthGets the line width, in twips, of the paragraph's frame.
getFrameStyleGets the style of the paragraph's frame.
getHangingIndentGets the distance, in twips, for the hanging indent.
getJustificationGets the kind of justification in documents containing Arabic or Hebrew characters.
getKeepLinesTogetherGets a value indicating whether a page break is allowed within the paragraph.
getKeepWithNextGets whether the paragraph is displayed on the same page as its following paragraph.
getLeftIndentGets the distance, in twips, between the left edge of the Text Control and the left edge of the text.
getLineSpacingGets the line spacing of a paragraph as a percentage of the font size.
getPageBreakBeforeGets whether the paragraph is always displayed on top of a page.
getRightIndentGets the distance, in twips, between the right edge of a Text Control document and the right edge of the text.
getStructureLevelGets the structure level of a paragraph in the document. The level can be between 0 and 10. A level of 0 indicates that the paragraph belongs to the body of the document.
getTabLeadersGets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.
getTabPositionsGets the absolute tab stop positions, in twips, in a paragraph.
getTabTypesGets the tab types in a paragraph.
getTopDistanceGets the distance, in twips, between this and the previous paragraph.
getWidowOrphanLinesGets the number of lines for widow/orphan control.
setAbsoluteLineSpacingSets the line spacing of a paragraph in twips.
setAlignmentSets the horizontal text alignment.
setBackColorSets the background color of a paragraph.
setBottomDistanceSets the bottom distance, in twips, between this and the next paragraph.
setDirectionSets the writing direction.
setFrameSets the framesetting of the paragraph.
setFrameDistanceSets the distance, in twips, between the text and the paragraph's frame.
setFrameLineColorSets the color used for the frame lines of a paragraph.
setFrameLineWidthSets the line width, in twips, of the paragraph's frame.
setFrameStyleSets the style of the paragraph's frame.
setHangingIndentSets the distance, in twips, for the hanging indent.
setJustificationSets the kind of justification in documents containing Arabic or Hebrew characters.
setKeepLinesTogetherSets a value indicating whether a page break is allowed within the paragraph.
setKeepWithNextSets whether paragraph is displayed on the same page as its following paragraph.
setLeftIndentSets the distance, in twips, between the left edge of the Text Control and the left edge of the text.
setLineSpacingSets the line spacing of a paragraph as a percentage of the font size.
setPageBreakBeforeSets whether the paragraph is always displayed on top of a page.
setRightIndentSets the distance, in twips, between the right edge of a Text Control document and the right edge of the text.
setStructureLevelSets the structure level of a paragraph in the document. The level can be between 0 and 10. A level of 0 indicates that the paragraph belongs to the body of the document.
setTabLeadersSets an array containing the tab leaders in a paragraph. A tab leader defines how a tab gap is filled.
setTabPositionsSets an array containing the absolute tab stop positions, in twips, in a paragraph.
setTabTypesSets an array containing the tab types in a paragraph.
setTopDistanceSets distance, in twips, between this and the previous paragraph.
setWidowOrphanLinesSets the number of lines for widow/orphan control.

Enumerations

EnumerationDescription
AttributeDetermines a certain paragraph format attribute.