PRB: Carriage Return Won't Wrap Lines in Text Box ControlLast reviewed: June 21, 1995Article ID: Q74906 |
The information in this article applies to:
SYMPTOMSUnder Microsoft Windows version 3.0, using Chr$(13) (the carriage return character) alone to create a line wrap to the next line in a Visual Basic text box control causes the character following the carriage return to be removed from a multiline text box. Under Microsoft Windows, version 3.1, it will cause a pipe character '|' to be displayed in the place of the CHR$(13).
RESOLUTIONTo wrap to the next line correctly, you must use both a carriage return and a linefeed -- Chr$(13) and Chr$(10).
STATUSThis behavior is by design.
MORE INFORMATIONThe correct method to create a line wrap is to use a carriage return character followed by a linefeed character, Chr$(13) + Chr$(10). The Windows text box expects to find this sequence and assumes that the character following the carriage return is a linefeed, thus removing the following character as if it were a linefeed. The following steps show the results of using just the carriage return, and the results of using both carriage return and linefeed characters in a text box.
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |