2020年5月17日 星期日

vb.net ListView加入Item並背影變色 [Listview change item background color]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    Public Sub ListViewAddNewItem(ByVal lv As ListView, ByVal title As String, ByVal body As String, ByVal clr As Color)

        Dim item As New ListViewItem

        item.Text = title

        item.SubItems.Add(body)

        item.BackColor = clr

        lv.Items.Add(item)

    End Sub

沒有留言:

張貼留言