Am i correct in saying PadRight will move the next string so many spaces to the right?
If so i dont think think this method will work due to when the string increases in chartacters the columns do not line up which seems to be happing no matter how i try to implment it.
Code:
sw.WriteLine("".PadRight(20, " "c) & "Name".PadRight(20, " "c) & _
"Material".PadRight(120, " "c) & _
"Length".PadRight(15, " "c) & _
"Qty".PadRight(8, " "c) & _
"Units".PadRight(8, " "c)) ' & _
sw.WriteLine("")
Dim i As Int16
With Me.ListView1
For i = 0 To CShort(.Items.Count - 1)
If .Items(i).Text <> "" Then
sw.WriteLine("".PadRight(20, " "c) & .Items(i).Text.PadRight(20, " "c) & _
.Items(i).SubItems(1).Text.PadRight(120, " "c) & _
.Items(i).SubItems(2).Text.PadRight(15, " "c) & _
.Items(i).SubItems(3).Text.PadRight(8, " "c) & _
.Items(i).SubItems(4).Text.PadRight(8, " "c)) ' & _
sw.WriteLine("")
End If
Next
End With