bpayne111 Posted December 14, 2003 Posted December 14, 2003 I have a multiline text box which i would like to add multiline text to. i tried to accomplish this like so. private void WhoCares() { _textCreated += ("Public " + words[1] + " " + words[2] + "()\n {get{return " + words[2] + ";}/n + "set{ " + words[2] + "= value;}/n}"); txtProperties.Text = _textCreated; } the "/n" is not creating new lines though it is simply displayed in the text. am i going to have to edit the Lines[] property directly? that seems like a lot of work compared to /n..... is there a 3rd way? thanks brandon Quote i'm not lazy i'm just resting before i get tired.
AlexCode Posted December 14, 2003 Posted December 14, 2003 I didn't test this but I think that if you replace the /n with chr(13) it would work... chr(13) = Enter Key Alex :D Quote Software bugs are impossible to detect by anybody except the end user.
bpayne111 Posted December 14, 2003 Author Posted December 14, 2003 chr(13) how could i forget an old favorite like that thanks Quote i'm not lazy i'm just resting before i get tired.
bpayne111 Posted December 14, 2003 Author Posted December 14, 2003 now i know how i forgot it.... becuase it doesn't work in C#... arrrg what's the = to Chr(13) in C# thanks brandon Quote i'm not lazy i'm just resting before i get tired.
Administrators PlausiblyDamp Posted December 14, 2003 Administrators Posted December 14, 2003 shouldn't it be "\n" rather than "/n"? - you've got both in your code ;) Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
bpayne111 Posted December 15, 2003 Author Posted December 15, 2003 all better Environment.NewLine is the answer i need. i searched some old posts to find it. thanks brandon Quote i'm not lazy i'm just resting before i get tired.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.