10-14-2003, 06:49 AM | #1 (permalink) |
Junkie
Location: RI
|
CheckedListbox question in Visual basic
Using Visual Basic .NET, I'm trying to make a checked list box. Now, what I have in that list box are certain values(duh, I know), but when you click on those values, I want them to add a certain value to something. I have tried messing with a piece of code that M$ provided but I don't seem to be getting anywhere.
Some background into what I'm doing. I'm creating an area creator program for my online game. It stores this certain value in a Bit Vector(hopefully that's how they do it). So if the 3rd and 2nd item on the list are checked, it adds a certain value for the 2nd and the 3rd item to a value, then puts the value into a file. I thought the most user friendly one would be to make the checkedlist box, but if that doesn't work, I'm going to need to create a second form, but I'll need to have that form return a value to this form... So any help is appriciated very much by myself and all those who want me to finish this damn project. |
10-14-2003, 07:12 AM | #3 (permalink) |
Junkie
Location: RI
|
First it needs to have two variables. I'll call one value and the other total. Both are initialized at 1. I want it go thru each item in the list, and check to see if the item is checked or not. Also, when it checks I need it to also multiply value by 2, if the item is checked, add value to total. Then have it restart the loop on the next item in the list doing the same thing.
I've tried CheckedItemList.Item(x).CheckedState where x is equal to what iteration it is in the loop, but that doesn't work, and there is a CheckedItems, but that won't go thru each value to do what I need it to do. |
Tags |
basic, checkedlistbox, question, visual |
|
|