Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:01:16+00:00 2026-06-02T03:01:16+00:00

I am trying to create a GUI where selecting an item inside the combobox

  • 0

I am trying to create a GUI where selecting an item inside the combobox changes whether each checkbox is checked or not.

The GUI has alot of checkboxes which user can check or uncheck.

For example, user can select “item 1” from combobox, which then user checks whatever checkbox he wants to check. Then, when the user selects “item 2”, checkboxes which were checked from “item 1” will be greyed out and user can check or uncheck from the rest.

Each items from combobox basically saves user’s choices on the checkbox.

Can anyone show me how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:01:17+00:00Added an answer on June 2, 2026 at 3:01 am

    For example 4 checkboxes, 1 combobox

        public Form1()
        {
            InitializeComponent();
            for (int i = 0; i < 3; i++)
                comboBox1.Items.Add(i.ToString());
            comboBox1.Text = comboBox1.Items[0].ToString();
        }
        bool needtoupdate = true;
        public class CheckedItems
        {
            public CheckedItems()
            {
                for (int i = 0; i < b.Length; i++)
                {
                    b[i] = false;
                }
            }
            public bool[] b = { false, false, false, false };
        }
    
        CheckedItems[] allcheckeditems = { new CheckedItems(), new CheckedItems(), new CheckedItems()};
    
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            needtoupdate = false;
            checkBox1.Checked = allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[0];
            checkBox2.Checked = allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[1];
            checkBox3.Checked = allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[2];
            checkBox4.Checked = allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[3];
            needtoupdate = true;
        }
    
        void saveallchecked()
        {
            if (!needtoupdate) return;
            allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[0] = checkBox1.Checked;
            allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[1] = checkBox2.Checked;
            allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[2] = checkBox3.Checked;
            allcheckeditems[Convert.ToInt32(comboBox1.Text)].b[3] = checkBox4.Checked;
        }
    
        private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
        {
        }
    
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            saveallchecked();
        }
    
        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            saveallchecked();
        }
    
        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            saveallchecked();
        }
    
        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            saveallchecked();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a simple GUI form which has only 2 elements
I'm trying to create a GUI (WPF) Library where each (custom) control basically wraps
i m trying to create windows executable from python program which has GUI .
I am trying to create a GUI using java swing. From there I have
I'm trying to create a GUI using Java by hand-coding it (without using GUI
I am trying to create my first GUI application using (Java + Eclipse +
I am trying to create this QT gui using a thread but no luck.
I'm trying to create a responsive gui, which basically means that I have an
I begin in GUI with Tkinter with Python. I'm trying to create a graphical
I'm trying, for the first time, to create a GUI in Ruby using Tk.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.