ComboBox的DataValue值
2006-02-04 13:52:02 来源:WEB开发网核心提示:PRocedure TForm1.Button1Click(Sender: TObject); var s : string; begin combobox1.Clear; s := '01'; combobox1.Items.AddObject('北京',TObject(s)); s
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;
更多精彩
赞助商链接