Item (ImageList Control) example for C++ Builder
long nCount;
int index ;
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 ;index <= LEADImgList1->Count – 1; index++)
if( LEADImgList1->Item [index] ->Selected == True) nCount++;
ShowMessage(IntToStr(nCount) +" Items were selected!");