Skip to content

pbWrap - DfBaseRichEdit

Determines whether text input will break and wrap to the next line at right margin

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

Syntax

Property Boolean pbWrap
Access Type Syntax
Read Access: Get pbWrap to BooleanVariable
Write Access: Set pbWrap to BooleanVariable/Value

Description

Determines whether text input will break and wrap to the next line at the right margin of this object, or will continue onward on the same line until a carriage return/linefeed is entered.

A rich edit control calls a function called a word-break procedure to find breaks between words and to determine where it can break lines. Word-break procedures for this control can determine whether a character is a delimiter and can find the nearest word break before or after the specified position. A delimiter is a character that marks the end of a word, such as a space. The control uses this information when performing word-wrap operations and when processing Ctrl+Left Arrow and Ctrl+Right Arrow key combinations.

A linefeed (LF) character can be added to text programmatically by adding ASCII character 10 to a string using the character function. A carriage return (CR) character can be added to text programmatically by adding ASCII character 13 to a string using the character function. Either a LF or CR character will break the current line in the control.

Sample

This sample turns on word wrapping of the control.

set pbWrap to True

Sample

This sample turns off word wrapping of the control.

set pbWrap to False

Sample

This sample adds linefeed characters to the end of lines of text to force a break of a long text string into multiple lines, then adds the text to the existing text of control oRichEdit1 using AppendText.

Procedure AddSomeText
    string sLineFeed sText

    move (character(10)) to sLineFeed

    move ("Procedure DoSomething"+sLinefeed) to sText
    move (sText+"    // add code here"+sLinefeed) to sText
    move (sText+"End_Procedure  // DoSomething"+sLinefeed) to sText

    send AppendText of oRichEdit1 sText
End_Procedure  // AddSomeText