Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Listbox Help

Hi, i have a project where we need to calculate payroll and add it in a listbox, and we have to compile a listbox in the following format

Payroll Summary
Sex Mar Hours Rate Gross Tax UI CPP Net Pay
M S 50 $10.00 $600.00 $99.98 $24.00 $27.00 $449.02
F M 40 $12.00 $510.00 $76.50 $22.95 $20.40 $390.15

The input is simply in textboxes, cuz we cant input anything in inputboxes.

My questions is: How do i get the second line aka F...M...40 right below the first line, without getting another "Payroll Summary" line to add?

Also how do i go about formatting these so they all stay in columns?

Sorry bout all these noobish questions, its just that im in a beginners course for this program

Thanks
[757 byte] By [saxey] at [2007-11-11 8:09:38]
# 1 Re: Listbox Help
You should be able to simply call the .Items.Add method of your listbox to add a new item.

Displaying listbox items with multiple columns is fairly advanced; if your instructor expects you to do so, s/he should have explained how. If you must have multiple columns, I recommend using a listview or grid control instead of a listbox.
Phil Weber at 2007-11-11 21:48:01 >