Click to See Complete Forum and Search --> : Listbox alternative suggestions?


tehcas
February 26th, 2006, 06:14 AM
I'm making an order form and I tried to use a listbox for the list of options, and that would have worked really easy, but i need more.

Some of the selectable options require additional input.

I was thinking some listview grid type thingy would do, but im not sure. I tried a search most if not all seemed to deal with MFC. This isnt MFC only, is it?

Will this work for me? Being able to select an option in a listbox(more than one actually, otherwise 2 textboxes would be setup to take those additional inputs) and add additional inputs?
Example: You have options "glaze", "powder" or "bars". glaze is ok on its own, but powder could accept an input for colour, or bars needs to know how many.


I've been stumped for days trying to rig something up for this, but i think i am just wasting my time doing it wrong. I'll be reading This (http://www.codeproject.com/listctrl/listview.asp) and hopefully be able to make some sense out of it.

appreciate any help. Thanks.

kirants
February 26th, 2006, 11:07 AM
I am still not sure what you want. If having multiple columns ( i.e. grid like thingy ) is what is in your mind, yes, you got listview control. For more sophisticated ones, you can use a grid control. There are some grid contols here under "Grid controls" section:
http://www.codeguru.com/Cpp/controls/controls/

BTW, listview is a common control provided by windows, so you can use as is without need for MFC , just like you are using Listbox

Here is the SDk reference for List-view control (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/listview.asp)

tehcas
February 26th, 2006, 11:49 AM
What I need is a 2 or 3 column listbox, first column for the option name, second for additional input. Kind of like a spreadsheet only it doesnt need to be as powerful. I just need it to fill in details.

I'm going to see if i can get the Babygrid to work. It looks most like what i need. The listview examples i saw didn't show me what i want. I couldnt find a way to make the second+ columns directly editable. Maybe i wasnt looking in the right place.

btw, am i missing something, or does your list-view link go to listbox reference?

kirants
February 26th, 2006, 11:52 AM
btw, am i missing something, or does your list-view link go to listbox reference?
Oops... sorry.. Fixed it