VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ArmComboItem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'Version 1.0
Option Explicit

Private mv_Data() As Variant
Public Combo As ArmCombobox

Public Sub SetDataSize(ai_Size As Integer)
  If ai_Size > 0 Then ReDim mv_Data(ai_Size - 1)
End Sub

Public Function GetDataSize() As Integer

  If IsArray(mv_Data) Then
    GetDataSize = UBound(mv_Data) + 1
  Else
    GetDataSize = 0
  End If
End Function

Public Function SetData(ai_Index As Integer, av_Data As Variant)
  If IsArray(mv_Data) Then
    If ai_Index <= UBound(mv_Data) Then mv_Data(ai_Index) = av_Data
  End If
End Function

Public Function GetData(ai_Index As Integer) As Variant
  If IsArray(mv_Data) Then
    If ai_Index <= UBound(mv_Data) Then GetData = mv_Data(ai_Index)
  End If
End Function

Public Property Get Key() As Variant
    Key = GetData(0)
End Property

Public Function DisplayText() As String
Dim ll_Index As Long
Dim ls_Text As String

  ls_Text = ""
  For ll_Index = 0 To Combo.DisplayColumnsCount - 1
    If ll_Index > 0 Then ls_Text = ls_Text & Combo.DisplayColumnSeparator
    ls_Text = ls_Text & GetData(ll_Index + 1)
  Next
  DisplayText = ls_Text
End Function
