private void comboBox1_TextChanged(object sender, System.EventArgs e) { int textposition = comboBox1.FindString(comboBox1.Text); if (comboBox1.Text.Length > 0 && textposition >= 0) { string currenttext = comboBox1.Text; string realtext = comboBox1.Items[textposition].ToString(); string remaingtext = realtext.Substring(currenttext.Length,realtext.Length - currenttext.Length); comboBox1.Text = realtext; comboBox1.SelectionStart = currenttext.Length; comboBox1.SelectionLength = remaingtext.Length; } }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question