I'm trying to add multiple lines and with different sections to a ListBox, and am required to use "\t" for creating a layout.
listBox.Items.Add(emp[index].first + "\t\t" + emp[index].last + "\t\t" + emp[index].number + "\t\t" + emp[index].department + "\t\t" + "Annual Salary: " + (emp[index].annualSalary).ToString("c") + ", Annual Bonus: " + (emp[index].annualBonus).ToString("c"));
Just one example line.
It comes out looking like: (without the dots)
Mary.......Sue................778-435-2321.....Accounting.....Annual Salary: $33,000.00 Trevor....Joseph...........604-894-2902.....Marketing.......Annual Salary: $52,000.00 Steve......Collin.............778-234-5432.....Finance..........Annual Salary: $48,500.00 George...........Watson..........604-910-2349.....Technical.......Annual Salary: $25,000.00 Sally.......Henderson.....604-654-2325.....Sales..............Annual Salary: $12,000.00 Jenny.....Motgomery.....604-692-4932.....Data Ana.......Annual Salary: $12,000.00
Can anyone explain why it's displaying all wonky, and how I might fix this? I've searched online, but couldn't find any results using \t for layout.