日期:2011-08-06  浏览次数:20519 次

ListView 控件 在 程序开发过程中的使用是非常广泛的。因为其不支持数据库的绑定,所以在数据库程序开发领域无法与datagridview抗衡 ,但是ListView的确是一个非常好用的控件。下面就把 一个简单的 ListView的例子发出来。

Public Class Form6Class Form6
    ’’’ <summary>
    ’’’ 英雄类
    ’’’ </summary>
    ’’’ <remarks></remarks>
    Public Class heroClass hero
        Private s_name As String
        Private s_age As Long
        Private s_like As String
        Public Property myName()Property myName() As String
            Get
                Return s_name
            End Get
            Set(ByVal value As String)
                s_name = value
            End Set
        End Property
        Public Property myAge()Property myAge() As Long
            Get
                Return s_age
            End Get
            Set(ByVal value As Long)
                s_age = value
            End Set
        End Property
        Public Property myLike()Property myLike() As String
            Get
                Return s_like
            End Get
            Set(ByVal value As String)
                s_like = value
            End Set
        End Property
    End Class
    ’’’ <summary>
    ’’’ 公共属性
    ’’’ </summary>
    ’’’ <remarks></remarks>
    Dim arrLike() As String = {"杀人", "放火", "吸毒", "抢劫", "盗窃", "上吊", "自虐", "赌博", "偷窥", "飙车"}
    Dim heroList As New SortedList
  &nbs