那你就在ComboBox1的OnExit里面写,离开了表示修改结束了

解决方案 »

  1.   

    最好在ComboBox1的OnChange事件中加;感覺在onexit里寫,好像不太好用
      

  2.   

    在ComboBox1的OnChange事件中加:
    case combobox1.items.itemindex of 
      0: AddToCombobox2('0');
      1: AddToCombobox2('1');
    end;procedure AddtoComBobox2(const Addindex : String);
    begin
      if Addindex = '0' then
      begin
        combobox2.items.add('a');
        combobox2.items.add('b');
        combobox2.items.add('c');
      end else
      begin
        combobox2.items.add('1');
        combobox2.items.add('2');
        combobox2.items.add('3');
      end;end;