Board index » cppbuilder » ListView checkbox problem
Victor G. Baron
![]() CBuilder Developer |
ListView checkbox problem2003-10-27 04:55:35 AM cppbuilder86 I have the following code: TStringList *Results = new TStringList; TListItem *ListItem; if(SearchForFile(GauFolder, "*.gau", Results)) { Label1->Caption = Results->Count; for(int x = 0; x < Results->Count; x++) { ListItem = ListView1->Items->Add(); ListItem->Caption = Results->Strings[x].SubString(Results->Strings[x].LastDelimiter("\\")+1,40); ListView1->Items->Item[x]->Checked = TRUE; } } It does a recursive search for files and returns the results in a Stringlist. I want ALL the results to have their checkbox checked. Out of 105 items on the list, there are several that are UNchecked! If I keep rerunning the application, the same ones are unchecked. Anyone have any idea what's happening? Thanx! Vic Baron -- Vic Baron I haven't lost my mind, it's backed up on disk somewhere! |