At the moment TFileListBox is broken, that is, it does not correctly display filenames according to the filetype (if FileType = [ftNormal] it does not display any files for example).
I wrote a patch and proposed it in the bugtracker, but, because I'm not absolutely sure about the desired behaviour of TFileListBix, Vincent suggested that I'd ask for feedback on this mailinglist. As far as I can see, studying the Delphi 3 Helpfiles, the FileListBox should act on the FileType property in the following way: 1. if FileType = [] (empty set) then no files will be displayed. 2. A regular file is a file that does not have the faHidden, faSysFile, faDirectory, or faVolumeId attribute set. 3. if FileType contains ftNormal, then all regular files will be displayed. 4. a file with (for example) attribute faHidden+faSysFile will only be showm if ftHidden and ftSystem are in Filetype (much like FindFirst shows files according to the Attribute) 5. if ftNormal is not in FileType then a file will only be shown if it has the faDirectory, faHidden, faSysFile or faVolumeId set, that is regular files will not be shown. 6. setting ftReadOnly does not have any effect on the shown files (behaviour observed in Delphi 3 Pro on Win9x) 7. setting ftArchive does not have any effect on the shown files (behaviour observed in Delphi 3 Pro on Win9x) In short: setting the FileType gives the same behaviour as setting Attributes for Findfirst with the exception of rule nr. 5 (excluding regular files). My question of course to you all is: are these assumptions correct? If so I will finetune my patch and post it back on the bugtracker. Bart
_______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
