Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Need Help adding a "new line" to a text box

Need Help adding a "new line" to a text box

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpc++tutorial
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HJB417
    wrote on last edited by
    #1

    hi, I have a textbox on a form that gets updated by the users, it's sort of like a log of events. The problem I'm having is, I don't know how to add a newline. I'm VB.NET, I got it to work by doing txtLog.AppendText(Format(TimeOfDay, "hh:mm ") & stgEventName & txtMessage.Text & vbNewLine) which concated the current time, the event name, the event message with a visualbasic_newline and it would look like: 14:34 POP3 email received 18:24 FTP received connection request from IP 24.29.165.87 18:38 FTP received connection request from IP 24.29.165.87 18:28 FTP received connection request from IP 24.29.165.87 but in Managed C++, it's coming out like 14:34 POP3 email received 18:24 FTP received connection request from IP 24.29.165.87 18:38 FTP received connection request from IP 24.29.165.87 18:28 FTP received connection request from IP 24.29.165.87 I tried doing: String* message = IncomingEvent; message->Concat(message, "\r\n"); ChatBox->AppendText(message); but to no avail =( -------------------------- One problem with the programmer's mentality is insecurity. This goes deep. An insulting college litany says that failed mathematicians become computer programmers. They are also ridiculed for being nerdy losers, for being too fat or too skinny, and for having few social skills. Most programmers can be spotted easily in a crowd. Nobody really wants to hang out with them. Put thousands of these people in one company and if you can get them to work, you become a billiona

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups