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. C#
  4. new line in label

new line in label

Scheduled Pinned Locked Moved C#
question
4 Posts 4 Posters 0 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.
  • S Offline
    S Offline
    sharon
    wrote on last edited by
    #1

    how can I make new line in label? I want that a label will be with number unknwon of lines and i want it ot be handled in run time. i want that a string will be created in run time and than to do : label.text = string how can i do it??:confused: thank u. sharon

    R S 2 Replies Last reply
    0
    • S sharon

      how can I make new line in label? I want that a label will be with number unknwon of lines and i want it ot be handled in run time. i want that a string will be created in run time and than to do : label.text = string how can i do it??:confused: thank u. sharon

      R Offline
      R Offline
      Rickard Andersson20
      wrote on last edited by
      #2

      I don't have the VS.NET on this computer right now but I think you have to set the label control to have multiply lines... Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!

      1 Reply Last reply
      0
      • S sharon

        how can I make new line in label? I want that a label will be with number unknwon of lines and i want it ot be handled in run time. i want that a string will be created in run time and than to do : label.text = string how can i do it??:confused: thank u. sharon

        S Offline
        S Offline
        Stephane Rodriguez
        wrote on last edited by
        #3

        .Multiline = true; MSDN doc.


        MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.

        B 1 Reply Last reply
        0
        • S Stephane Rodriguez

          .Multiline = true; MSDN doc.


          MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.

          B Offline
          B Offline
          bfarley
          wrote on last edited by
          #4

          No multiline property for a label. I think your ref is for a text box. Did you try putting a newline in the string to see what happens? label.Text = "Text" + Environment.NewLine + "More Text"; Not sure if that will work. Bill F

          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