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

Public Sub InicializarLista(lvwList As ListView, _
                            aColumnTitle() As String, _
                            aColumnWidth() As Single, _
                            aColumnAlign() As Integer, _
                            IDView As Integer)
                            
  'Inicializa las columnas de la lista
  
  On Error GoTo LineaError
  
  Dim clmX As ColumnHeader

  Dim iArrayLen As Integer
  Dim iIndex As Integer
  
  lvwList.ColumnHeaders.Clear

  ' Determinar la longitud del arreglo
  iArrayLen = UBound(aColumnTitle)

  ' Crear las columnas con: Titulo, ancho y alineacion
  For iIndex = 0 To (iArrayLen - 1)
    Set clmX = lvwList.ColumnHeaders.Add(, , aColumnTitle(iIndex), _
                                            lvwList.Width * aColumnWidth(iIndex), _
                                            aColumnAlign(iIndex))
  Next

  ' Poner el modo inicial de vista
  lvwList.View = IDView
  lvwList.FullRowSelect = True
  
  Exit Sub
  
LineaError:
  MsgBox Err.Description, vbOKOnly + vbInformation
  
End Sub




