Results 1 to 2 of 2

Thread: Populating a Listview control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    treehouse
    Posts
    106

    Post

    I have a listview control I am trying to fill reading out of a database but its placing the data vertically instead of horizontally.

    Here's the code:
    dim Mynode as listview

    sDateBilled = !BirthDate
    soptionamount = !FirstName
    sTotalPlanAmount = !LastName
    ssubtotal = !HireDate
    sCredit = !City
    sDebit = !Region
    sTotal = !PostalCode
    sAmountPaid = !Country


    frmBilling1.ListView1.ListItems.Add , , sDateBilled
    Set Mynode = frmBilling1.ListView1.ListItems.Add.ListSubItems.Add(, , ssubtotal)
    frmBilling1.ListView1.ListItems.Add.ListSubItems.Add , , soptionamount
    frmBilling1.ListView1.ListItems.Add.ListSubItems.Add , , sTotalPlanAmount


    [This message has been edited by bontyboy (edited 02-18-2000).]

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Just change the View property to lvwList before you populate it.

    i.e

    ListView1.View = lvwList

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

    [This message has been edited by Serge (edited 02-18-2000).]

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