Item (ImageList Control) example for Delphi
var
nCount : LongInt;
index: integer;
begin
LEADImgList1.SelectAll(False);
{flip the 3rd item's bitmap}
LEADImage1.Bitmap := LEADImgList1.Item[2].Bitmap;
LEADImage1.Flip;
LEADImgList1.Item[2].Bitmap := LEADImage1.Bitmap;
{set the 4th and 6th items as selected}
LEADImgList1.Item[3].Selected := True;
LEADImgList1.Item[5].Selected := True;
{now, count the selected items}
nCount := 0;
for index := 0 to LEADImgList1.Count – 1 do
if LEADImgList1.Item [index].Selected = True then Inc(nCount);
ShowMessage(IntToStr(nCount) +' Items were selected!');
end;