用tcombobox.text只是取得了capation,无法取得选中的item。

解决方案 »

  1.   

    选中某一个item,tcombobox的rext值不就是你要的吗?我没懂
      

  2.   

    选中的item,,,Text的值变成你选中的ITEM的值了
      

  3.   

    self.ComboBox1.ItemIndex:=self.ComboBox1.Items.IndexOf('列名');
      

  4.   

    procedure TForm1.ComboBox1Change(Sender: TObject);
    var
      msg:string;
    begin
      msg:=combobox1.Text ;'这个选中的就是当前的值
      showmessage(msg);
    end;
    你要的是当前的什么?不是这个值吗?
      

  5.   

    是啊,我也是这么做的,可是showmessage出来的是空的。
    但是tcombobox里明明已经有选中的了
      

  6.   

    combobox1.items[combobox1.itemindex];