Del Texley wrote: > I posted earlier about the jvFileListBox and Vista and since then I've > determined what is happening and need some help in how to fix this. I > had populated the FileListBox.Mask with a list of desired extensions. > This works fine with w2k, xp and xp pro. It fails on Vista if you have > the folder options set to hide known file extensions. Under XP this > setting had no effect on the selection process, but Vista hid the > extensions from the FileListBox control. Disabling the hide know file > extensions solved the issue, but I'd like to have the program be able to > handle this gracefully, rather than forcing the user to figure out how > to do this (and it's much harder for the average user to change the > folder settings in Vista, Microsoft limits where this can happen.) > > So, any suggestions on how to get around this Vista created problem?
Don't get around it. Solve it. Or at least identify where the problem really is so you can submit a useful bug report to JVCL. First, the control you're asking about is a descendant of Delphi's TFileListBox. Do you get the same problem with that control? If the problem is limited to the JVCL control, then take a look at its code. It doesn't have many methods, so finding the interesting ones isn't hard. It overrides the ReadFileNames method, and it looks like that method is what populates the list. The list of files is generated from a TJvSearchFiles object. Do you get the same behavior (of missing file names) if you use that class directly instead of going through TJvFileListBox? TJvSearchFiles uses FindFirstFile and FindNextFile to enumerate files. When you call those functions, do you get the right file names in the TWin32FindData.FileName field? The component then uses TJvSearchParams.Check to see whether the found file matches the search criteria. When you step through with the debugger, at which criterion does the function reject the files you expected it to accept? The function calls JclStrings.StrMatches to compare the file name against the mask. Does it return the right result when you call that function directly to test some inputs? -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

