vbAccelerator - Contents of code file: cCTreeViewColumn.cls

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "cCTreeViewColumn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private m_hWndCtl As Long
Private m_lID As Long
Private m_lCol As Long

Friend Sub fInit(ctl As vbalColumnTreeView, ByVal lID As Long)
   m_hWndCtl = ctl.hwnd
   m_lID = lID
End Sub

Private Function pbVerify(ByRef ctlThis As vbalColumnTreeView) As Boolean
Dim lPtr As Long
Dim lIdx As Long
   If IsWindow(m_hWndCtl) Then
      lPtr = GetProp(m_hWndCtl, gcOBJECT_PROP)
      If Not (lPtr = 0) Then
         If (lPtr = 1) Then
            Debug.Print "NOOOOOO"
         End If
         Set ctlThis = ObjectFromPtr(lPtr)
         m_lCol = ctlThis.fColumnForID(m_lID)
         If (m_lCol > 0) Then
            pbVerify = True
         End If
      Else
         gErr 1, "cCTreeViewColumn"
      End If
   Else
      gErr 1, "cCTreeViewColumn"
   End If
End Function

Public Property Get Key() As String
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      Key = ctl.fColumnKey(m_lCol)
   End If
End Property

Public Property Get Text() As String
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      Text = ctl.fColumnText(m_lCol)
   End If
End Property
Public Property Let Text(ByVal sText As String)
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      ctl.fColumnText(m_lCol) = sText
   End If
End Property
Public Property Get Image() As Long
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      Image = ctl.fColumnImage(m_lCol)
   End If
End Property
Public Property Let Image(ByVal lIconIndex As Long)
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      ctl.fColumnImage(m_lCol) = lIconIndex
   End If
End Property
Public Property Get Width() As Long
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      Width = ctl.fColumnWidth(m_lCol)
   End If
End Property
Public Property Let Width(ByVal lWidth As Long)
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      ctl.fColumnWidth(m_lCol) = lWidth
   End If
End Property
Public Property Get Tag() As String
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      Tag = ctl.fColumnTag(m_lCol)
   End If
End Property
Public Property Let Tag(ByVal sTag As String)
Dim ctl As vbalColumnTreeView
   If (pbVerify(ctl)) Then
      ctl.fColumnTag(m_lCol) = sTag
   End If
End Property