public ComboBoxEx() { //Load the textbox and comboBox and add them to this control tb.Show(); this.Controls.Add(tb); cb.Show(); this.Controls.Add(cb); tb.BringToFront(); //tb.Multiline = true; // we need this to set the size properly //tb.WordWrap = false; cb.SelectedValueChanged += new EventHandler(cb_SelectedValueChanged); cb.SelectedIndexChanged += new EventHandler(cb_SelectedIndexChanged); tb.LostFocus += new EventHandler(tb_TextChanged); tb.KeyUp += new System.Windows.Forms.KeyEventHandler(ComboBox_KeyUp); }