コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Btn phone = (Btn)comboBox1.SelectedItem;

            if (phone != null)
            {
                comboBox1.Items.Remove(phone);
                comboBox1.Text = "";
            }
        }
コード例 #2
0
 void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     Btn phone = (Btn)comboBox1.SelectedItem;
 }