Results 1 to 2 of 2

Thread: ListView thing

  1. #1

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    San Jose, CA, USA
    Posts
    43

    Post

    I can add items to the listview when using
    the columnheaders, but i can't get any items to go into the other columns... how do i do this??

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    you need to used the subitems er... thingy

    Code:
    Option Explicit
    
    Private Sub Command1_Click()
      Dim itmX As ListItem
      Set itmX = ListView1.ListItems.Add(, , "something in col 1")
      itmX.SubItems(1) = "something in col 2"
      itmX.SubItems(2) = "somehing in col 3"
    End Sub
    
    Private Sub Form_Load()
      ListView1.View = lvwReport
      ListView1.ColumnHeaders.Add , , "Column 1"
      ListView1.ColumnHeaders.Add , , "Column 2"
      ListView1.ColumnHeaders.Add , , "Column 3"
    
    End Sub
    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

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