Article ID: 814312 - Last Review: December 3, 2007 - Revision: 2.9 Text after the first line is lost when you modify the Multiline property of the RichTextBox control from true to falseOn This PageBeta InformationThis article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.No formal product support is available from Microsoft for this Beta product. For information about how to obtain support for a Beta release, see the documentation that is included with the Beta product files, or check the Web location from which you downloaded the release. SYMPTOMSWhen you type multiple lines of text in a RichTextBox control, and then modify the Multiline property from True to
False, you lose the text in the RichTextBox after the first line. When you modify the Multiline property, only the first line exists in the RichTextBox. However, when you modify the Multiline property from True to False for a RichTextBox, all the text of the control is appended to the first
line. WORKAROUNDTo work around this problem, save the text in the RichTextBox before you toggle the Multiline property. After you modify the Multiline property, append all the text lines into the first line, and then
assign the text back to the RichTextBox. To do this, use the following code: Visual Basic .NET or Visual Basic 2005 Code STATUS This
behavior is by design. MORE INFORMATIONSteps to Reproduce the Behavior
REFERENCESFor more information, visit the following MSDN Web
site: Introduction to the Windows Forms RichTextBox Control http://msdn2.microsoft.com/en-us/library/aa983713(VS.71).aspx (http://msdn2.microsoft.com/en-us/library/aa983713(VS.71).aspx) APPLIES TO
| Article Translations
|
Back to the top
