+ 1
ComboBox in winforms C#
Hello, I need to fill combo box with four option // Fill the season_cb combo box with option season_cb.Items.Insert(0, "Season 1"); season_cb.Items.Insert(1, "Season 2"); season_cb.Items.Insert(2, "Season 3"); season_cb.Items.Insert(3, "Season 4"); season_cb.SelectedIndex = 0; Now I need the selected text MessageBox.Show(season_cb.SelectedText); This gives me " ". please tell me the proper syntax. Advance thanks!
2 ответов
+ 2
https://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.selecteditem(v=vs.110).aspx
season_cb.SelectedItem.ToString ();
SelectedText is the text that you mark when you want to copy something
0
@sneeze, thanks
Its work fine