Solved

Is it possible to select multiple files in a FileListBox ?

Posted on 2011-03-24
3
546 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
[X]
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
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:Ephraim Wangoya
Ephraim Wangoya 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

705 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