piParagraphIndent - DfBaseRichEdit
Sets or returns indentation of selected paragraph or paragraphs
Type: Property
Access: Read/Write
Data Type: integer
Parameters: None
Syntax
Property integer piParagraphIndent
| Access Type | Syntax |
|---|---|
| Read Access: | Get piParagraphIndent to integerVariable |
| Write Access: | Set piParagraphIndent to integerVariable/Value |
Description
Sets or returns the indentation of selected paragraph or paragraphs.
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.
piOffsetIndent sets or returns indentation of 2nd and subsequent lines, relative to first line, of selected paragraph or paragraphs.
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.
Sample
This sample indents the selected paragraph or paragraphs by 0.5 inches, which is the default for most RichEdit programs.
Procedure DoIndent
integer iTwipsPerInch iCurrentIndent
// number of twips per inch
move 1440 to iTwipsPerInch
// indent 0.5 inches from current indentation
get piParagraphIndent to iCurrentIndent
set piParagraphIndent to (iCurrentIndent + (iTwipsPerInch * 0.5))
End_Procedure // DoIndent
Sample
This sample outdents the selected paragraph or paragraphs by 0.5 inches, which is the default for most RichEdit programs.
Procedure DoOutdent
integer iTwipsPerInch iCurrentIndent
// number of twips per inch
move 1440 to iTwipsPerInch
// outdent 0.5 inches from current indentation
get piParagraphIndent to iCurrentIndent
set piParagraphIndent to (iCurrentIndent - (iTwipsPerInch * 0.5))
End_Procedure // DoOutdent