ComboBoxEx Error

eNarc
eNarc used Ask the Experts™
on
Hi, why wont this work??

  with Form6.ComboBoxEx1.ItemsEx.Add do begin
    Caption:='hh';
    Indent := Indent;
    ImageIndex := 1;
  end;

I'm just wanting to add into the ComboBox1 and put a image next to it thogh its not working.

keeps saying list index out of bounds (1)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Geert GOracle dba
Top Expert 2009

Commented:
the imagelist you assigned to the combobox,
does it have images ? at least 2 ?

Indent := Indent ???
more meaningfull with better naming conventions

const
  cIndent = 10;

Indent := cIndent;
Commented:
Hi, ImageIndex is 0 based, this means that the first image has index 0.

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial