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. send data from a listbox to textbox

send data from a listbox to textbox

Scheduled Pinned Locked Moved Visual Basic
csharp
4 Posts 2 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
    sixecho
    wrote on last edited by
    #1

    could u please tell me a way to send data from a listbox to textbox vb.net 2005

    C 1 Reply Last reply
    0
    • S sixecho

      could u please tell me a way to send data from a listbox to textbox vb.net 2005

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      sixecho wrote:

      could u please tell me a way to send data from a listbox to textbox vb.net 2005

      What data do you want to send from the list box? Let's assume you mean that you want the text box to display the currently selected item in the list box.

      MyTextBox.Text = MyListBox.SelectedItem.ToString();


      Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

      S 1 Reply Last reply
      0
      • C Colin Angus Mackay

        sixecho wrote:

        could u please tell me a way to send data from a listbox to textbox vb.net 2005

        What data do you want to send from the list box? Let's assume you mean that you want the text box to display the currently selected item in the list box.

        MyTextBox.Text = MyListBox.SelectedItem.ToString();


        Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

        S Offline
        S Offline
        sixecho
        wrote on last edited by
        #3

        this code was helpful but what i really wanted was to get all the items in the list box at once to the text box...(without selecting any item)...

        C 1 Reply Last reply
        0
        • S sixecho

          this code was helpful but what i really wanted was to get all the items in the list box at once to the text box...(without selecting any item)...

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Then iterate over the items collection. For Each Object item In MyListBox.Items ...


          Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

          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