AddLineFeeds Property

Visual Studio .NET 2003

Specifies that the EditBox should insert linefeed characters (CHR(10)) after carriage return characters (CHR(13)) within the text of an EditBox whenever the Value property is read or whenever the value is stored to the ControlSource. Available at design time and run time.

Object.AddLineFeeds[ = lExpr]

Parameters

lExpr   
True (.T.)   (Default) Linefeed characters are inserted into the EditBox text after carriage return characters when the Value property is read or stored to the ControlSource.

False (.F.) The EditBox text is not modified when the Value property is read or stored to the ControlSource.

Remarks

The EditBox, by default, ensures that line endings have both carriage return and linefeed characters by inserting linefeed characters if they are not present when the Value property is read. In addition to when user code reads the Value property, this may also occur whenever the EditBox loses focus, since Visual FoxPro automatically reads the Value contents and stores to the ControlSource at that time.

Inserting linefeed characters shifts text, but the SelStart value does not change; therefore, the SelStart property can point to the wrong location in the text buffer. Set the AddLineFeeds property to False (.F.) to ensure that no characters are inserted into the text buffer.

Reading the Text property never causes linefeed characters to be inserted, regardless of the setting of AddLineFeeds.

See Also

ControlSource Property | SelStart Property | Text Property | Value Property

Applies To: EditBox Control

Show: