TO:LiSDN(LOCK ON) 
焦点移开算完成,当下次获得焦点时,下列框中的值是刚才改过的值

解决方案 »

  1.   

    this.comboBox.Items[index] = newValue;
      

  2.   

    int myindex=-1;//自定义变量,用于记录当前的index
    private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    Sindex=this.comboBox1.SelectedIndex;
    }
    private void comboBox1_Validated(object sender, System.EventArgs e)
    {
    if(this.Sindex!=-1)
    {
    string a=this.comboBox1.Text;
    this.comboBox1.Items[this.Sindex]=a;
              }}
      

  3.   

    int myindex=-1;//自定义变量,用于记录当前的index
    private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
    myindex=this.comboBox1.SelectedIndex;
    }
    private void comboBox1_Validated(object sender, System.EventArgs e)
    {
    if(this.myindex!=-1)
    {
    string a=this.comboBox1.Text;
    this.comboBox1.Items[this.myindex]=a;
              }}