?
Solved

SaveDialog1

Posted on 2010-01-12
2
Medium Priority
?
444 Views
Last Modified: 2013-11-23
Hi I'd like to save a file in 2 formats.

though I need to know what format the person selected when saving the file

when the save box opens there is a drop down box with lots of file extensions.

if the person selected txt then

if save.ext='txt then
//
else if save.ext='doc' then
//

and so on. when the the code is executed.

cos it has a thing for save.filename

has it got one for the extension?
0
Comment
Question by:eNarc
2 Comments
 
LVL 12

Accepted Solution

by:
Hypo earned 1000 total points
ID: 26299151
You have the FilterIndex property of the TSaveDialog which tells you what extension was selected when the dialog was closed...
0
 
LVL 38

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 1000 total points
ID: 26299166
just use the filterindex :

if you set the filter property
txt first
doc second

  if SaveDialog1.Execute then
  begin
    case SaveDialog1.FilterIndex of
      1: --> txt
      2: --> doc
    end;
  end;
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

621 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