如题
FlatComboBox1.Items.Strings[0]:='男';
FlatComboBox1.Items.Strings[1]:='女';可是老报错 List index out of bounds(0)
FlatComboBox1.Items.Strings[0]:='男';
FlatComboBox1.Items.Strings[1]:='女';可是老报错 List index out of bounds(0)
FlatComboBox1.Items.add(st1);
再 FlatComboBox1.Items.add('男');
然后
style := csDropDownList;等等
....
ComboBox.Index:=0;
combobox1.items.add('2')
ComboBox1.style := csDropDown;
ComboBox1.items.add('string you want add!');or:假如combobox里边当前有‘男’‘女’两个值,取‘男’,则:
ComboBox1.items.index := 0;
or
ComboBox1.items.text := '男';
赋值:
Str := combobox.strins[combobox.itemindex];