Results 1 to 5 of 5

Thread: Add List View Item

  1. #1

    Thread Starter
    Banned
    Join Date
    Jul 2006
    Location
    Atlanta, GA, USA
    Posts
    28

    Add List View Item

    VB Code:
    1. Dim NewTask As String = InputBox("TASK")
    2.         ListView1.Items.Add(NewTask)

    It's saying String 'NewTask' can not be converted. Please help!

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Add List View Item

    Try
    Dim lvItem As New ListViewItem

    vItem = New ListViewItem
    lvItem.Text = "This is my text"
    lListview1.Items.Add(lvItem)

    Pete

  3. #3
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    Re: Add List View Item

    try this

    Dim NewTask As String
    NewTask = InputBox("TASK")
    List1.AddItem (NewTask)
    Thanks and Regards,

    Muhammad Abbas

  4. #4

    Thread Starter
    Banned
    Join Date
    Jul 2006
    Location
    Atlanta, GA, USA
    Posts
    28

    Re: Add List View Item

    Ok thanks. How could I make it so it has a check box next to each item?

  5. #5
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Add List View Item

    Change the 'Checkboxes' property to True

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