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. Appending text

Appending text

Scheduled Pinned Locked Moved Visual Basic
tutorial
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.
  • P Offline
    P Offline
    Pasan148
    wrote on last edited by
    #1

    Normally when we using 'Appendtext' method of a text box, the text will append to end of existing text in the text box. But i want to know that is there method to append text to specific location of a text box. As a example i have two text boxes named text1 and text2. When i am typing in textbox1, the text will append to textbox2 as same time. Now i want to append this text to textbox2 to the specific location (to beginning or to middle or somewhere) not to end. I hope your kind reply and sorry for my bad english.

    D 1 Reply Last reply
    0
    • P Pasan148

      Normally when we using 'Appendtext' method of a text box, the text will append to end of existing text in the text box. But i want to know that is there method to append text to specific location of a text box. As a example i have two text boxes named text1 and text2. When i am typing in textbox1, the text will append to textbox2 as same time. Now i want to append this text to textbox2 to the specific location (to beginning or to middle or somewhere) not to end. I hope your kind reply and sorry for my bad english.

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

      You need the String.Insert method.

      50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

      P 1 Reply Last reply
      0
      • D dan sh

        You need the String.Insert method.

        50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

        P Offline
        P Offline
        Pasan148
        wrote on last edited by
        #3

        thank you d@nish for your fast reply. I have another question. when we change cursor location of a text box, how can I get cursor location as a number. As a example when i put cursor beginning of the text or any other location i want to get a value indicating cursor location.( When I put the cursor beginning of the text then the cursor location will be 0, and when I put the cursor end of the text then the cursor location will be length of the text)

        L 1 Reply Last reply
        0
        • P Pasan148

          thank you d@nish for your fast reply. I have another question. when we change cursor location of a text box, how can I get cursor location as a number. As a example when i put cursor beginning of the text or any other location i want to get a value indicating cursor location.( When I put the cursor beginning of the text then the cursor location will be 0, and when I put the cursor end of the text then the cursor location will be length of the text)

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          There is a thing called documentation; you can retrieve it easily by entering the class name of interest and maybe the word MSDN into the Google search box. Read and learn, don't ask the world to spoon feed you. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


          P 1 Reply Last reply
          0
          • L Luc Pattyn

            There is a thing called documentation; you can retrieve it easily by entering the class name of interest and maybe the word MSDN into the Google search box. Read and learn, don't ask the world to spoon feed you. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


            P Offline
            P Offline
            Pasan148
            wrote on last edited by
            #5

            hey, I found it. Thanks for your idea.

            L 1 Reply Last reply
            0
            • P Pasan148

              hey, I found it. Thanks for your idea.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Good. Now discover the world, and come back when you have harder questions! :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages


              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