vb6 listview control delete dotted border

0

I am modifying an old application of my work. Through winsock and listview I show a series of printers and basically their status. I'm complicating a dotted box around the 1st item in the listview, I do not know how to avoid it. The idea is that it's just a visual report, I do not need to interact with the rows. Any idea how to make the edge disappear? Attachment fragment where I configure the listview and an image of the problem. Thanks !!!

    With ListView1
        .ColumnHeaders.Clear
        .ListItems.Clear
        .View = lvwReport
        .SmallIcons = ImageList1
        .MultiSelect = False
        .HideSelection = True
        .SortKey = 0
        .SortOrder = lvwAscending
        .Sorted = True
        Set ch = .ColumnHeaders.Add(, , "        Equipo", 2510)
        Set ch = .ColumnHeaders.Add(, , "        Estado", 2510)
        Set ch = .ColumnHeaders.Add(, , "Fecha reporte", 3320, lvwColumnCenter)
        Set ch = .ColumnHeaders.Add(, , "Tickets", 1315, lvwColumnCenter)
    End With

    
asked by look68 14.02.2017 в 15:24
source

2 answers

0

There is a property of the ListView, which is called something like FullRowSelect , it is set to true and that changes the behavior to a different one that does not have that rectangle

    
answered by 14.02.2017 в 15:53
0

I have not played VB6 for many years, so I do not know if it will work for you, but in some Visual Basic forums ( link ) recommended putting the property SelectedItem to Nothing . It seems that it worked for them. Others also proposed to add ListIndex = -1

Your code would be left with the change.

With ListView1
    .ColumnHeaders.Clear
    .ListItems.Clear
    .View = lvwReport
    .SmallIcons = ImageList1
    .MultiSelect = False
    .HideSelection = True
    .SortKey = 0
    .SortOrder = lvwAscending
    .Sorted = True
    Set ch = .ColumnHeaders.Add(, , "        Equipo", 2510)
    Set ch = .ColumnHeaders.Add(, , "        Estado", 2510)
    Set ch = .ColumnHeaders.Add(, , "Fecha reporte", 3320, lvwColumnCenter)
    Set ch = .ColumnHeaders.Add(, , "Tickets", 1315, lvwColumnCenter)
    .SelectedItem = Nothing
    .ListIndex = -1
End With

I hope it serves you

    
answered by 14.02.2017 в 16:00