Io lo farei così:
'' gb.util need
Private hGrid As GridView
Public Sub Form_Open()
With Me
.H = 360
.W = 400
.Arrangement = Arrange.Vertical
.Margin = True
End With
With hGrid = New GridView(Me)
.Expand = True
.Header = GridView.Both
.Columns.Count = 3
.Columns[0].Text = "DATUM"
.Columns[0].Width = 120
.Columns[1].Text = "PRODUKT"
.Columns[1].Width = 120
.Columns[2].Text = "PREIS"
End With
UpPriceList
End
Private Sub UpPriceList()
Dim hList As CsvFile
Dim cList As Collection
Dim i As Integer
Dim s, sPath As String
sPath = "./output.txt"
hList = New CsvFile(sPath, "|") ' opens in reading
While Not hList.Eof
hGrid.Rows.Count += 1
cList = hList.Read()
hGrid[i, 0].Text = cList!Datum
hGrid[i, 1].Text = cList!Produkt
hGrid[i, 2].Text = cList!Preis
Inc i
Wend
hList.Close
End
Dimenticavo di allegare il file di testo che deve mostrare/avere le intestazioni...