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. C# in Windows Application

C# in Windows Application

Scheduled Pinned Locked Moved C#
csharpdatabasehelptutorialquestion
3 Posts 3 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.
  • N Offline
    N Offline
    Nath
    wrote on last edited by
    #1

    Hi ALL, retrieving a string from database like this 1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string Thanks Nath

    W D 2 Replies Last reply
    0
    • N Nath

      Hi ALL, retrieving a string from database like this 1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string Thanks Nath

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Nath wrote:

      Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string

      If you really mean splitting, have a look at String.Split method. if you just want to show that on several lines and control the line breaks you could add new lines before the ordinal numbers.

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      • N Nath

        Hi ALL, retrieving a string from database like this 1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string Thanks Nath

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        Will the length and pattern of the string remain same? If not, then you cannot assure that the string can be shown in 3-4 lines. If it remains same, you can get three equal length substrings from the string. (There is a lot of chance that the substring will be illogically formed.) Or, split the string over numbers(provided pattern remains same) and join the consecutive parts till the total length becomes about 1/4th of the original string.

        The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."

        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