下拉框combobox的items如何在程序中赋值?(100分)

斌斌

Unregistered / Unconfirmed
GUEST, unregistred user!
下拉框combobox的items如何在程序中赋值,我在程序中使用
combobox1.items[0]:='dfasdfsdfsa';
在DELPHI4时是正常的,但在DELPHI6时老是提示错误:list index[0]....
请问如何赋值才对?
 
ComboBox1.items.add;
ComboBox1.items[ComboBox1.Items.count-1].strings:='要赋的值';

记着先add
 
ComboBox1.items.add('asdfasdf');
 
with combobox do
begin
items.add('abc');
end;
 
顶部