Hi, I'm having trouble lining up data from a file with their respectable columns in a list box. I am using print zones to space out data evenly, but when i run the program the output is still messy. So I need help lining up columns properly together. As of now, the first 2 list box items line up with each other perfectly, the data i am looping through to add to list box is not lining up correctly. I have changed my zones several times, but still no luck. Any suggestions?
A chunk of my code (some) :
Dim fmtstr1 As String = "{0,-5} {1,20} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
Dim fmtstr2 As String = "{0,-5} {1,20} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
Dim fmtstr3 As String = "{0,-5} {1,10} {2,7} {3,7} {4,7} {5,7} {6,7} {7,8} {8,12}"
lstReport.Items.Add(String.Format(fmtstr1, _
"Name", _
"ID", _
"Mon", _
"Tue", _
"Wed", _
"Thu", _
"Fri", _
"Total", _
"Average"))
lstReport.Items.Add(String.Format(fmtstr2, _
"----", _
"--", _
"---", _
"---", _
"---", _
"---", _
"---", _
"-----", _
"-------"))
lstReport.Items.Add(String.Format(fmtstr3, _
Records(i).first & " " & Records(i).last, _
Records(i).ID, _
Records(i).monSales, _
Records(i).tuesSales, _
Records(i).wedSales, _
Records(i).thurSales, _
Records(i).friSales, _
total, _
average))