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. Visual Basic
  4. Multiline text box manipulating

Multiline text box manipulating

Scheduled Pinned Locked Moved Visual Basic
help
4 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.
  • U Offline
    U Offline
    User 11061789
    wrote on last edited by
    #1

    I am making a little app and I am stuck. I have a multilined textbox and I would like a button to take the text and reverse the line order. So if the text was numbered each line as 1->9, pressing the button will reorder the lines so they are 9->1.

    L R 2 Replies Last reply
    0
    • U User 11061789

      I am making a little app and I am stuck. I have a multilined textbox and I would like a button to take the text and reverse the line order. So if the text was numbered each line as 1->9, pressing the button will reorder the lines so they are 9->1.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 11096018 wrote:

      I am making a little app and I am stuck.

      Where are you stuck? Edit your message and show exactly which part you are having problems with.

      U 1 Reply Last reply
      0
      • L Lost User

        Member 11096018 wrote:

        I am making a little app and I am stuck.

        Where are you stuck? Edit your message and show exactly which part you are having problems with.

        U Offline
        U Offline
        User 11061789
        wrote on last edited by
        #3

        i figured it out Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Dim counter As Integer = txtNames.Lines.Length - 1 ' create array to reverse line order ReDim fileNames(counter) For iLine = 0 To counter fileNames(counter) = txtNames.Lines(iLine) Next iLine ' using the array building a string starting from the end of the array Dim list As String = "" For iLine = 0 To counter list = list + txtNames.Lines(counter) + vbCrLf counter = counter - 1 Next iLine 'display results txtNames.Text = list.Trim End Sub

        1 Reply Last reply
        0
        • U User 11061789

          I am making a little app and I am stuck. I have a multilined textbox and I would like a button to take the text and reverse the line order. So if the text was numbered each line as 1->9, pressing the button will reorder the lines so they are 9->1.

          R Offline
          R Offline
          Raushank03
          wrote on last edited by
          #4

          To play and increase your level must CLICK on http://techgurulab.com/course/vb-net-quiz-online/[^]

          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