1) Add your combobox to your form
2) On button press or form load or whatever use
I used the Form1_Load
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("Object 1");
comboBox1.Items.Add("Object 2");
}
You can use the same thing to remove items
private void Form1_Load(object sender, EventArgs e)
{
comboBox1.Items.Add("Object 1");
comboBox1.Items.Add("Object 2");
comboBox1.Items.Remove("Object 1");
}


Sign In
Create Account


Back to top









