All pastes #227842 Raw Edit

Someone

public text v1 · immutable
#227842 ·published 2006-10-29 17:30 UTC
rendered paste body
Module ioFunct

    Public VarListPath As String = "C:\JCFG\variables.txt"

    Public colName() As String


    Public Sub PopulateList()

        'Only use if creating a new control As New, Control already exists
        'Dim lstConfig As New ListView()

        'Set Default Properties at CALL to PopulateList()

        'Already set at creation..
        frmMain.lstConfig.Bounds = New Rectangle(New Point(10, 10), New Size(300, 300))
        frmMain.lstConfig.View = View.Details
        frmMain.lstConfig.LabelEdit = True
        frmMain.lstConfig.AllowColumnReorder = True
        frmMain.lstConfig.FullRowSelect = True
        frmMain.lstConfig.GridLines = True
        frmMain.lstConfig.Sorting = SortOrder.None

        ' Create three items and three sets of subitems for each item.
        Dim colItem As New ListViewItem("STRING", 0)

        colItem.SubItems.Add("NodeName")
        colItem.SubItems.Add("3CORPS")

        ' Create columns for the items and subitems.
        frmMain.lstConfig.Columns.Add("Type", -2, HorizontalAlignment.Left)
        frmMain.lstConfig.Columns.Add("Variable", -2, HorizontalAlignment.Left)
        frmMain.lstConfig.Columns.Add("Setting", -2, HorizontalAlignment.Left)


        'Add the items to the ListView.
        frmMain.lstConfig.Items.AddRange(New ListViewItem() {colItem})


        ' Add the ListView to the control collection.
        frmMain.Controls.Add(frmMain.lstConfig)
    End Sub
End Module