Results 1 to 4 of 4

Thread: 2 ListView questions. 1 about selecting records. 2 about adjusting listview Box size.

  1. #1

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330
    Hi,
    I'm changing some of my programs to use a ListView instead of a ListBox.

    1. On selecting a record how do I pass the info from the fifth column to another Sub? (I have .FullRowSelect = True)

    2. I'm dynamically adjusting the column widths to the maximum length of the data going into the column. Is there a way to dynamically adjust the width of the listview box itself to be the sum of the column widths?

    Thanks,
    Al.

  2. #2

  3. #3
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    Item 1 - In listview, the first column is the item, and any columns after that are subitem(1) thru ?. To access the fifth column you would do something like:

    variable = frmForm.lstListView.listitems(row).subitem(4)

  4. #4

    Thread Starter
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Thank you.

    Hi,
    I just discovered ListViews vs ListBoxes. I've been setting the ListBox font to fixed-width, e.g. Courier, to get a column look.

    Al.
    A computer is a tool, not a toy.

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