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 / C++ / MFC
  4. Edit Box alignment problem

Edit Box alignment problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 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.
  • C Offline
    C Offline
    cppcook
    wrote on last edited by
    #1

    Hi everyone, I have an Edit box in a dialog with multiline property and four scroll bar properties checked. A text file is read into the edit box. The file is tab spaced structured data file (40 rows, but with thousands of columns). The problem is the edit box will break the row in the original file into several rows and display it. This makes the data looks unstructured and disordered. I know this is because the row is too long so the Edit box wraps words automatically. But can we avoid this? thanks, gavin

    D E 2 Replies Last reply
    0
    • C cppcook

      Hi everyone, I have an Edit box in a dialog with multiline property and four scroll bar properties checked. A text file is read into the edit box. The file is tab spaced structured data file (40 rows, but with thousands of columns). The problem is the edit box will break the row in the original file into several rows and display it. This makes the data looks unstructured and disordered. I know this is because the row is too long so the Edit box wraps words automatically. But can we avoid this? thanks, gavin

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Does the WS_HSCROLL style help?


      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

      "Judge not by the eye but by the heart." - Native American Proverb

      C 1 Reply Last reply
      0
      • D David Crow

        Does the WS_HSCROLL style help?


        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

        "Judge not by the eye but by the heart." - Native American Proverb

        C Offline
        C Offline
        cppcook
        wrote on last edited by
        #3

        Thanks David, I checked all the four scroll properties, Horizontal scroll, Auto Hscroll, Vertical Scroll, Auto Vscroll. But it didn't help. Gavin

        D 1 Reply Last reply
        0
        • C cppcook

          Thanks David, I checked all the four scroll properties, Horizontal scroll, Auto Hscroll, Vertical Scroll, Auto Vscroll. But it didn't help. Gavin

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Does your text happen to have any embedded CR OR LF characters in it? I just tried this by entering a long line of text into a narrow edit control and it scrolled vertically until I hit Enter.


          "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

          "Judge not by the eye but by the heart." - Native American Proverb

          C 1 Reply Last reply
          0
          • D David Crow

            Does your text happen to have any embedded CR OR LF characters in it? I just tried this by entering a long line of text into a narrow edit control and it scrolled vertically until I hit Enter.


            "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

            "Judge not by the eye but by the heart." - Native American Proverb

            C Offline
            C Offline
            cppcook
            wrote on last edited by
            #5

            Yes. The text file has newline characters in it. The edit box will jump to a new line after a limited length of characters even if it doesn't meet a CR or LF character. While this is not what I want. thanks anyway. gavin

            1 Reply Last reply
            0
            • C cppcook

              Hi everyone, I have an Edit box in a dialog with multiline property and four scroll bar properties checked. A text file is read into the edit box. The file is tab spaced structured data file (40 rows, but with thousands of columns). The problem is the edit box will break the row in the original file into several rows and display it. This makes the data looks unstructured and disordered. I know this is because the row is too long so the Edit box wraps words automatically. But can we avoid this? thanks, gavin

              E Offline
              E Offline
              earl
              wrote on last edited by
              #6

              Why not use a grid? earl

              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