?
Solved

TOpenDialog file woes.....

Posted on 1998-04-08
7
Medium Priority
?
298 Views
Last Modified: 2010-05-18
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?
0
Comment
Question by:RogerMadore
[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
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361338
Can you show some code?
0
 

Author Comment

by:RogerMadore
ID: 1361339
  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
 
LVL 5

Accepted Solution

by:
ronit051397 earned 200 total points
ID: 1361340
if OpenDialog1.Execute then
  Memo1.Lines.Assign(OpenDialog1.Files);
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:RogerMadore
ID: 1361341
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
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361342
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1361343
I am going to rest in the carribeans, so you better reject my answer and let others to answer.

Bye
Ronit
0
 

Author Comment

by:RogerMadore
ID: 1361344
I have Delphi 3 Client/Server (Build 5.53)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

718 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