Results 1 to 3 of 3

Thread: Listview stuff

  1. #1
    Guest
    I'm fairly new to VB and development so please excuse the level of knowledge, but hopefully I can gain a lot here.
    I've designed a simple form with some textboxes and a command button. How do I add the text from the textboxes to my four columns in my listview with my click event on the button. I tried variuos methods but the data is being written down one column, not across the columns as I need.

    Thanks,

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'add columnHeaders..the width of the columns is
    'the widht of the ctrl / 2 by the num of headers
    '
    Set sColumn = Listview1.ColumnHeaders.Add(, , "Name")
    Set sColumn = Listview1.ColumnHeaders.Add(, , "Phone #1")
    Set sColumn = Listview1.ColumnHeaders.Add(, , "Phone #2")
    '
    'add some data to the listitem (sItem)
    Set sItem = Listview1.ListItems.Add(, , text1, 1, 1)
    sItem.SubItems(1) = text2
    sItem.SubItems(2) = text3
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    Thanks,
    (HeSaidJoe) your code worked with a little modification suitable to my form. Thanks for the response.

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