none
How do I do a new line in this case?

    Question

  • monoFlat_TextBox2.Text = "doing things";           

    System.Threading.Thread.Sleep((int)System.TimeSpan.FromSeconds(3).TotalMilliseconds);       

    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 01, 2017 4:08 PM

All replies

  • Friday, December 01, 2017 4:12 PM
  • Where do I add it exactly?
    Friday, December 01, 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 07, 2017 2:20 PM
    Friday, December 01, 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";

    Regards,

    Stanly


    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 MSDNFSF@microsoft.com.

    Friday, December 08, 2017 1:17 AM