Need VB.net checkbox help!

Soldato
Joined
29 Jul 2004
Posts
9,717
Location
Bristol
Hi all, got to do me a small program for some college work, currently doing an elder scrolls 4 character creation tool. Basically, you pick gender/race/specialisation/birthsign and if churns out your starting stats.

Only thing i'm having trouble with at the moment, is 'resetting' the CheckedListBox. I want it so you can reset it all and do another character without closing/reopening. I can clear all the values/various combo boxes etc, but unticking the checkboxes is proving a pain.

I know theres gonna be some simple code that does it, but not having that much experience is proving a pain.


I'm also thinking of putting all the races and there attributes into a 2 dim array, but i haven't done it in a while does anyone happen to know of a good guide anywhere?


Cheers all any help much apprecieated!!
 
m0rte said:
Code:
        Dim i As Integer
        For i = 0 To myCheckedListBox.Items.Count - 1
            myCheckedListBox.SetItemChecked(i, False)
        Next
Edit: or-
Code:
        Dim i As Integer
        For i = 0 To myCheckedListBox.Items.Items.Count - 1
            myCheckedListBox.SetItemCheckState(i, CheckState.Unchecked)
        Next

That should do it :)


Excellent, that worked a treat thanks very much!
 
Back
Top Bottom