TOpenDialog file woes.....

I've been using TOpenDialog for selecting multiple files. Although the selected files are stored in the TString property "Files", I can't seem to access all the lines of this object. It will contain the first 17 files and a truncated copy of the 18th line. Is this a known bug? Is there are patch or a workaround?
RogerMadoreAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ronit051397Connect With a Mentor Commented:
if OpenDialog1.Execute then
  Memo1.Lines.Assign(OpenDialog1.Files);
0
 
ronit051397Commented:
Can you show some code?
0
 
RogerMadoreAuthor Commented:
  If OpenDialog.Files.Count>0 Then
      Begin
      For X := 0 To OpenDialog.Files.Count-1 Do
         Begin
         If FileExists(OpenDialog.Files[X]) Then
            Begin
            mtrLoadFiles(OpenDialog.Files[X]);
            Memo.Lines.Add(OpenDialog.Files[X]+' added.');
            End;
         End;

0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
RogerMadoreAuthor Commented:
Thanks for the answer, but unfortunately it doesn't work. If you look at the source of Dialog.Pas, you'll see a buffer being used. I tried changing this buffer size and creating my own component, but it still didn't work.... perhaps I overlooked something. Thanks for any other input.
function TOpenDialog.DoExecute(Func: Pointer): Bool;
const
  MultiSelectBufferSize = 8192;
  ...
begin
   ...
    if ofAllowMultiSelect in FOptions then
      nMaxFile := MultiSelectBufferSize else
      nMaxFile := MAX_PATH;
   ...
0
 
ronit051397Commented:
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
0
 
ronit051397Commented:
I am going to rest in the carribeans, so you better reject my answer and let others to answer.

Bye
Ronit
0
 
RogerMadoreAuthor Commented:
I have Delphi 3 Client/Server (Build 5.53)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.