打印本文 打印本文 关闭窗口 关闭窗口
ComboBox的DataValue值
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1808  更新时间:2009/4/23 18:44:51  文章录入:mintao  责任编辑:mintao
procedure TForm1.Button1Click(Sender: TObject); var s : string; begin combobox1.Clear; s := ''''01''''; combobox1.Items.AddObject(''''北京'''',TObject(s)); s := ''''02''''; combobox1.Items.AddObject(''''天津'''',TObject(s)); s := ''''03''''; combobox1.Items.AddObject(''''上海'''',TObject(s)); end; procedure TForm1.ComboBox1Change(Sender: TObject); begin edit1.Text := string(combobox1.Items.Objects[combobox1.ItemIndex]); end;

打印本文 打印本文 关闭窗口 关闭窗口