combobox c# text add ... simple question
Hello.
Desired Experience
>>Combobox adds typed in strings to its item collection when the user presses enter .. without me writing new software
Actual Experience
>>I wrote a few lines of software to add above feature.
The software I wrote is small but I do not want to use extra software if the feature is built in. Here is the little successful software I wrote .. I just dont know if it is necesary.
private void
comboBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Return)
{
this.comboBox1.Items.Add(this.comboBox1.Text);
this.NavigateWB(this.comboBox1.Text);
}
}
All related questions below.
1. Will a combobox add an edited TEXT string automatically to its items members?
2. Must I write software to do the above?
3. Is there a boolean value I must set so that the combobox automatically adds items?
Thanks in advance.