Hi all!
I am trying to add a few strings to a listbox and using String.format to format the string being added.
Sample:
listBox1.items.add("{0,-15}{1,-15}{0,-15}{0,-15}{0,-15}{0,-15}{0,-15}",str1,str2.str3,str4,str5,str6,str7);
When I use this in a loop to add items,they don't allign with the rest of the items.
here is a sample of the output.
(form1 and inside listBox1)
AnimalName AnimalType FoodIntake FoodValue
Vijju Monkey 200 205
vij Bird 22 20
Any advice is appreciated.
Thanks in advance.. .
I am trying to add a few strings to a listbox and using String.format to format the string being added.
Sample:
listBox1.items.add("{0,-15}{1,-15}{0,-15}{0,-15}{0,-15}{0,-15}{0,-15}",str1,str2.str3,str4,str5,str6,str7);
When I use this in a loop to add items,they don't allign with the rest of the items.
here is a sample of the output.
(form1 and inside listBox1)
AnimalName AnimalType FoodIntake FoodValue
Vijju Monkey 200 205
vij Bird 22 20
Any advice is appreciated.
Thanks in advance.. .