Hi!
I have one combobox with a textbox.
Inside of my combobox I have three items (Morning, afternoon, goodnight). Then each selection is displayed into the textBox.
What I need to do?
When I select "morning" for example I would like that even I selected the second way its not should appear twice into the textbox (only once). Its allow to appear again ONLY when the textbox its clean it.
My code:
private void cbxChoice_SelectedIndexChanged(object sender, EventArgs e)
{
switch (cbxChoice.SelectedIndex)
{
case 0:
//Morning
textDisplay.Text += "\n" + Environment.NewLine + cbxChoice.Text + Environment.NewLine + ",";
textDisplay.clear();
break;
case 1:
//Afternoon
textDisplay.Text += "\n" + Environment.NewLine + cbxChoice.Text + Environment.NewLine + ",";
textDisplay.clear();
break;
case 2:
//Night
textDisplay.Text += "\n" + Environment.NewLine + cbxChoice.Text + Environment.NewLine + ",";
textDisplay.clear();
break;
Azeem AnzariPosted Aug 29, 2015, 10:30 AM
IsraelPosted Aug 29, 2015, 11:51 AM
IsraelPosted Aug 29, 2015, 8:16 AM
Azeem AnzariPosted Aug 29, 2015, 7:13 AM
IsraelPosted Aug 29, 2015, 6:31 AM
Azeem AnzariPosted Aug 29, 2015, 12:20 AM
IsraelPosted Aug 29, 2015, 12:16 AM
Azeem AnzariPosted Aug 28, 2015, 11:39 PM
IsraelPosted Aug 28, 2015, 11:28 PM
Azeem AnzariPosted Aug 28, 2015, 11:13 PM
IsraelPosted Aug 28, 2015, 11:00 PM
Azeem AnzariPosted Aug 28, 2015, 10:24 PM