Results 1 to 4 of 4

Thread: question on listview

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17
    How do I change a listview from

    _________
    A|XXX|FFF|
    _|___|___|
    A|YYY|FFF|
    _|___|___|
    A|ZZZ|GGG|
    _|___|___|


    to

    _________
    .|XXX|...|
    .|___|...|
    A|YYY|FFF|
    .|___|___|
    .|ZZZ|GGG|
    _|___|___| where the .(dot) represents empty space.

    PS: For those who can't figure out what I have drawn, please copy and paste the figure to a notepad. Then you will have a better view of what I have drawn.

    TIA

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Try something like this:
    listview.ListItems(0).SubItems(1)="blabla"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17
    kedaman,

    Are you trying to say that add in advance to the subitems?? If that's what you mean, then it couldn't work.

    Can you elaborate more...

    thanks.

  4. #4
    Lively Member
    Join Date
    Jun 1999
    Location
    East Anglia, England
    Posts
    73
    Hello,
    This is what I think you're trying to do, just add a command button to your form and give it a go.
    Code:
    Option Explicit
    
    Private Sub Command1_Click()
        With ListView1.ListItems.Add()
            .Text = "Col -1"
            .SubItems(1) = "Col - 2"
            .SubItems(2) = "Col - 3"
        End With
    End Sub
    
    Private Sub Form_Load()
        With ListView1
            .View = lvwReport
            With .ColumnHeaders
                .Add 1, "Col-1", "Col-1"
                .Add 2, "Col-2", "Col-2"
                .Add 3, "Col-3", "Col-3"
            End With
        End With
    End Sub
    Hope it helps,
    Desire.

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