Solved

Is it possible to select multiple files in a FileListBox ?

Posted on 2011-03-24
3
540 Views
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 ?
0
Comment
Question by:ChLa
3 Comments
 
LVL 24

Accepted Solution

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

Open in new window

0
 
LVL 32

Assisted Solution

by:ewangoya
ewangoya earned 125 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


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

Open in new window

0
 

Author Comment

by:ChLa
ID: 35208806







































That looks easy...Thank You








0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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