读书人

自定义 控件 如何像LISTVIEW 设置Key

发布时间: 2012-12-14 10:33:07 作者: rapoo

自定义 控件 怎么像LISTVIEW 设置Key "ByVal Key As String"

'自定义类型声明
Private Type HeaderInfo
sText As String
iWidth As Long
SmallIcon As Object
BigIcon As Object
End Type

Private Type ListInfo
sText As String
SubItem() As String
SubItemCnt As Long
SubSmallIcon() As Object
SubBigIcon() As Object
SmallIcon As Object
BigIcon As Object
End Type

'增加列表项
Public Sub AddListItem(ByVal Key As String, ByVal sText As String, Optional SmallIcon As Object, Optional BigIcon As Object)
ReDim Preserve m_LI(m_LCnt)
m_LI(m_LCnt).sText = sText
Set m_LI(m_LCnt).SmallIcon = SmallIcon
Set m_LI(m_LCnt).BigIcon = BigIcon
m_LCnt = m_LCnt + 1
tmrInit.Enabled = False
tmrInit.Enabled = True
End Sub

[解决办法]
进来者得分

读书人网 >VB

热点推荐