LISTBox
-
I am building a cash register with one textbox showing the item, another the price and another the quantity of that item being purchased. How can I get a line in a listbox to show the price, quantity and item purchased? Also, with another list box just containing the totals of each item purchased, how can I get a grand total with 2 decimal places? Thank you :confused:
-
I am building a cash register with one textbox showing the item, another the price and another the quantity of that item being purchased. How can I get a line in a listbox to show the price, quantity and item purchased? Also, with another list box just containing the totals of each item purchased, how can I get a grand total with 2 decimal places? Thank you :confused:
1 - by adding an item to the listbo 2 - by using the overload of ToString that takes a format specifier.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
1 - by adding an item to the listbo 2 - by using the overload of ToString that takes a format specifier.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
ListBox1.Items.Add(new ListBoxItem(theStringYouWantInTheListBox); decimal theAmount = 3.345234; string currency = theAmount.ToString("c");
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )