Results 1 to 2 of 2

Thread: Help about ListView report view

  1. #1

    Thread Starter
    Addicted Member rbnwares's Avatar
    Join Date
    Sep 2000
    Location
    Philippines
    Posts
    142

    Question

    How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.
    Stupidity is better than cure.

    VB6 SP5 Enterprise Ed.
    C, Pascal, VC++ 6.0


    Running Win98 SE and Win2000 Prof. Ed.


    Email me at : [email protected]

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195


    Dim clmX As ColumnHeader
    Dim itmX As ListItem

    ' Will set up 4 columns
    Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
    Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
    Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
    Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)

    ' Add first row, first column
    Set itmX = ListView1.ListItems.Add(Index, Key, "1st column value")
    ' Subitems are the rest of the columns for the first row
    itmX.SubItems(1) = "" ' No 2nd column value
    itmX.SubItems(2) = "3rd column value"
    itmX.SubItems(3) = "4th column value"

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