Combobox控件使用

增加字段

ComboBox1.Items.Add(‘添加内容’);

追加字段

combobox1.Items.Append('内容');

选中项索引值

ComboBox1.ItemIndex

删除当前选中项

combobox1.Items.Delete(combobox1.ItemIndex);

选中项的文本内容

ComboBox1.Items[ComboBox1.ItemIndex]

总条数 

ComboBox1.Items.Count;

取得显示文本内容

ComboBox1.Text;

插入字段

combobox1.Items.Insert(Index: Integer; const S: string);
index欲插入之前的索引值必须为大于等于0的整形 S为欲插入的字符串

清除combobox内容

combobox1.Clear;

手动设置索引值

ComboBox1.ItemIndex :=0;
原文地址:https://www.cnblogs.com/lilongjiang/p/2075967.html