RogerMadore
asked on
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?
Can you show some code?
ASKER
If OpenDialog.Files.Count>0 Then
Begin
For X := 0 To OpenDialog.Files.Count-1 Do
Begin
If FileExists(OpenDialog.File s[X]) Then
Begin
mtrLoadFiles(OpenDialog.Fi les[X]);
Memo.Lines.Add(OpenDialog. Files[X]+' added.');
End;
End;
Begin
For X := 0 To OpenDialog.Files.Count-1 Do
Begin
If FileExists(OpenDialog.File
Begin
mtrLoadFiles(OpenDialog.Fi
Memo.Lines.Add(OpenDialog.
End;
End;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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;
...
function TOpenDialog.DoExecute(Func
const
MultiSelectBufferSize = 8192;
...
begin
...
if ofAllowMultiSelect in FOptions then
nMaxFile := MultiSelectBufferSize else
nMaxFile := MAX_PATH;
...
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
I am going to rest in the carribeans, so you better reject my answer and let others to answer.
Bye
Ronit
Bye
Ronit
ASKER
I have Delphi 3 Client/Server (Build 5.53)