Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

How to Fill Combobox with 18 files of a predefined directory?

Hi Folks!

After browsing through the solution database I decided to drop my question here anyway.
My combobox should wrap its arms around one predefined directory in which 18 ini files reside, no subdirs just those 18 files.

Amaze me :) > I'm curious as to how many lines of code this will add to my project and that in fact is the reason I decided to post it  instead of grabbing an answer from the database solutions.

Regs,

Peter
0
PeterdeB
Asked:
PeterdeB
  • 2
1 Solution
 
shaneholmesCommented:
Drop a TFileListBox on your form, set its visible property = false;



 FileListBox1.Directory:=  YourDirectory

 FileListBox1.Mask:= '*.*;  //or set it to what ever extension of files you want

 ComboBox1.Items.Assign(FileListBox1.Items);


Hope this helps!

sholmes
0
 
PeterdeBAuthor Commented:
Ok tnx Shane, fast as ever :)

I'm off to Delphi now but will return!

Regs,

Peter
0
 
PeterdeBAuthor Commented:
Why even bother to check whether it works, when it always does!

Muchos Gracias!

Regs,

Peter :)
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now