How do I do a new line in this case? RRS feed

  • Question

  • monoFlat_TextBox2.Text = "doing things";           


    monoFlat_TextBox2.Text = "done doing things";

    This is my current code but I want to have the done doing things be on a new line in the TextBox2

    Friday, December 1, 2017 4:08 PM

All replies

  • Friday, December 1, 2017 4:12 PM
  • Where do I add it exactly?
    Friday, December 1, 2017 4:26 PM
  • Where do I add it exactly?
    monoFlat_TextBox2 += Environment.NewLine + "done doing things";

    • Proposed as answer by Anil Sachin Thursday, December 7, 2017 2:20 PM
    Friday, December 1, 2017 4:58 PM
  • Hi CTahmid,

    The textbox is a single-line input control by default, if you want to display some records with multiline, also have to set the "Multiline" property to true, then use the solution provided by Castorix31:

        monoFlat_TextBox2.Multiline = true;
        monoFlat_TextBox2.Height = 40;
        monoFlat_TextBox2.Text += Environment.NewLine + "done doing things";



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, December 8, 2017 1:17 AM