From ff64a875fced6129271e4f0f1b7ab16c131c2b81 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sat, 5 Mar 2016 16:59:16 -0800 Subject: [PATCH] ComboBox empty text => index 0 Easier clearing of values; instead of saying "stuff is wrong", it's obvious the user deleted the text so just set it to the 0th item. --- PKX/f1-Main.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index 1d898c99f..918b898f3 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -2060,6 +2060,8 @@ private void validateComboBox(object sender) ComboBox cb = (ComboBox)sender; cb.SelectionLength = 0; + if (cb.Text == "") + { cb.SelectedIndex = 0; return; } cb.BackColor = cb.SelectedValue == null ? Color.DarkSalmon : defaultControlWhite; } private void validateComboBox(object sender, EventArgs e)