首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

自定义 控件 如何像LISTVIEW 设置Key "ByVal Key As String"

2012-12-14 
自定义 控件 怎么像LISTVIEW 设置Key ByVal Key As String自定义类型声明Private Type HeaderInfosText

自定义 控件 怎么像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

[解决办法]
进来者得分

热点排行