Skip to content

piSpacingBefore - DfBaseRichEdit

Determines the spacing above selected paragraph or paragraphs

Type: Property
Access: Read/Write
Data Type: integer
Parameters: None

Syntax

Property integer piSpacingBefore
Access Type Syntax
Read Access: Get piSpacingBefore to integerVariable
Write Access: Set piSpacingBefore to integerVariable/Value

Description

If any part of a paragraph is selected, this property applies to the entire paragraph. If the cursor is in a paragraph, this property applies to the entire paragraph.

This property uses twips, which are 1/1440 of an inch, or 1/20 of a printer's point.

This property has no effect if control is not paged.

Use piSpacingAfter to determine the spacing below selected paragraph or paragraphs.

Sample

This sample increases the spacing above the selected paragraph or paragraphs by half an inch.

Procedure IncreaseSpacingBefore
    integer iTwips iCurrentSpacing

    // number of twips per inch
    move 1440 to iTwips

    get piSpacingBefore to iCurrentSpacing
    set piSpacingBefore to (iCurrentSpacing + (iTwips * 0.5))
End_Procedure // IncreaseSpacingBefore