[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Is it possible to select multiple files in a FileListBox ?

Posted on 2011-03-24
Medium Priority
Last Modified: 2012-06-21
Is it possible to select multiple files in a FileListBox ? If so, how do I get a list of the selected files ?
Question by:ChLa
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Accepted Solution

jimyX earned 500 total points
ID: 35207722
Set the property "MultiSelect" to True.
procedure TForm1.Button1Click(Sender: TObject);
  for i:= 0 to FileListBox1.Count-1 do
    if FileListBox1.Selected[i] then
      showmessage(FileListBox1.Items.Strings[i]);  // or do whatever you want

Open in new window

LVL 32

Assisted Solution

by:Ephraim Wangoya
Ephraim Wangoya earned 500 total points
ID: 35207838
Have to set MultiSelect from the properties
Check the SelCount to see if multiple records are selected then loop thro the items checking the Selected[index] method

  I: Integer;
  if FileListBox1.SelCount > 0 then
     for I := 0 to FileListBox1.Count-1 do
       if FileListBox1.Selected[I] then
          //your code

Open in new window


Author Comment

ID: 35208806

That looks easy...Thank You


Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question