9
Reply

help on word wrap problem

jamie

jamie

Jan 20 2008 3:51 AM
9.2k

I created an application that askes several questions. One of the questions is

Installations instructions. So the user of my application will type installation instructions into a textbox and that info will be written to a textfile using streamwriter(). My problem is that on the form, the text wordwraps to fit the textbox fine, but when you open up the text file in notepade, you get one really long line of text. I need a way to get my text to wordwrap in notepad also. I am aware of the fact that notepad has a wordwrap option, but i need to program this into my code. I have no idea how to do that. this is a sample of the code i am using

sw.WriteLine("***********************************************************************");

sw.WriteLine("* *");

sw.WriteLine("* Installation Instructions *");

sw.WriteLine("* *");

sw.WriteLine("***********************************************************************");

sw.WriteLine(text8); //this needs to be word wrapped !

sw.WriteLine();


Answers (9)