CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    Changing text to an existing list box item

    I have items in a list box control that I need to change the text of, but I haven't figured out how to do that yet.

    If I could check the index of an existing item in the list box, I could then change the text of that index, but it doesn't appear that list box controls work that way.

    Does anyone know how to change text for an existing item in a VB.NET List Box Control?

    Thanks!
    Bob

  2. #2
    Join Date
    Jun 2003
    Location
    Malaysia (P.J)
    Posts
    410
    ListBox1.Items.Add("AA")
    ListBox1.Items.Add("BB")
    ListBox1.Items.Add("CC")
    ListBox1.Items.Add("DD")
    ListBox1.Items.Add("EE")


    'in ur button click change "BB" to "VV"
    ListBox1.Items.Item(1) = "VV"
    Back after a long hibernation.

  3. #3
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured