Using comboex3 on Windows.
My first test:
Created a TComboBoxEx at run-time and added a few items using AddItem, as soon as I touched it, it gave me "List index (0) out of bounds." error message. Test code:
uses
..., comboex;
procedure TForm1.Button1Click(Sender: TObject);
var
C1:TComboBox;
C2:TComboBoxEx;
procedure Test1(C: TCustomComboBox; vTop: integer);
var
i:integer;
begin
with C do
begin
Left := 10;
Top := vTop;
Parent := Self;
for i := 1 to 10 do
if C is TComboBoxEx then
(C as TComboBoxEx).AddItem(Format('AddItem %d',[i]), TObject.Create)
else
Items.Add(Format('Add %d',[i]));
end;
end;
begin
C1:=TComboBox.Create(Self);
Test1(C1, 100);
C2:=TComboBoxEx.Create(Self);
Test1(C2, 200);
end;