Hey all, I am currently creating a program that is like an automated food ordering menu.
Imagine a form that has two listboxes (or listviews), the first listbox contains the items that can be ordered, I stored these items into an array and displayed them using a for loop construct on the first listbox. The second listbox contains three columns one for "Food Name" another for "Quantity" and another one for "Price". And between the two boxes there is a button that when pressed transfers a selected item from the first listbox to the next listbox.
So what I have done so far was to display the items on the first listbox, and then transfer a selected item from the first box to the second with the press of the button.
My question now is, how do I access the other columns so that I could fill them up? I know that to add contents in a listbox from one to the other goes something like:
But my problem with that is it just transfers the item to the first column and that I do not know how I could somehow put in data on the other two columns. I also do not know how to put in the price based on the selected item, what I thought of was creating two arrays, first for the item names and the second for their prizes? how do I go about transferring the price to the third column, with respect to the selected item?
What should I use for my solution a listbox or listview? they seem like the same and looks to me like there are no differences between the two.
And lastly, I want to create my custom made dialog box, in which when the user adds the item to the second listbox, it immediately asks the user the quantity of the current item they would like to purchase, and display that quantity and the computed price (quantity*priceOfProduct) in the second and third columns respectively? I have created and designed another form within my solution that shall become the dialog box, and the only problem is how do I get it to pop up, get the user to type in data to the textbox and then return the data to the second column and use the data returned to compute for the price.
Thank you very much to those who'll be having the patience to help me on this. I can post my very very small code if anyone wants to see what my gui looks like.