Jump to content
  • Advertisement
Sign in to follow this  
Malazar

C# Forms CheckedListBox questions

This topic is 3961 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I havea few questions about the checkedListBox control in windows forms in C#. basicly, i have created a program that had a list of options the user can select. what i want to find out is, if there's a way of detecting how many they have selected. depending upon other choices made, they may get to chose one of the items in the list, however, another user could have the option of selecting three, four, or more options from this list. so my question is: how can i set this list so that: A) it knows how many items are selected B) once the maximum available choices are made, no further selections can be made - this is something of a minor concern, as once it knows how many items are selected, adding this is more of a trivial extension of that. i've looked around, and most articles i've seen seem to cover how to use it to check weather a specific item was selected - which is useful, but nto what i'm looking for. does anyone have any ideas of their own, or knows of an article that covers somehing similar to this?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by PsychoPumpkin
To get the number of how many are selected:

int numberOfChecked = checkedListBox1.CheckedItems.Count;


ah ha, thank you very much :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!