Save Dialog

Posted on 2001-07-16
Medium Priority
Last Modified: 2010-04-04
Does anyone know how to change the text on the buttons in the SaveDialog under Delphi 2?
Question by:winuser2000
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
  • 4
LVL 21

Expert Comment

ID: 6288106
You may be able to locate the properties for this dialog in Dialog.pas

Locate ButtonNames....

You should save this file to a different name before you go making any changes to it or else you'll be reinstalling Delphi!

You'll also have to import the "new" savedialog as a new component!


Author Comment

ID: 6288242
gemarti:  I had a look in the Dialog.pas but no button names labelled "save".  All that was there was:

ButtonNames: array[TMsgDlgBtn] of string = ('Yes', 'No', 'OK', 'Cancel', 'Abort', 'Retry', 'Ignore', 'All', 'Help');

and i checked throught the rest of the code but no luck
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6288633

   you can do that with SetDlgItemText API, in the onShowEvent for the SaveDialog place two these lines

  SetDlgItemText(GetParent(OpenDialog1.Handle), IDOK, PChar('New &Open'));
  SetDlgItemText(GetParent(OpenDialog1.Handle), IDCANCEL, PChar('New &Cancel'));

Best regards
Mohammed Nasman
Industry Leaders: 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!


Author Comment

ID: 6288668
Thanks mnasman but there is no onshowevent for the savedialog in delphi 2as far as i can see.
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6288683
Sorry winuser2000

 I mean the event Onshow not OnshowEvnet
procedure TForm1.OpenDialog1Show(Sender: TObject);

Author Comment

ID: 6289004
thanks mnasman but i cannot compile as it keeps saying about "handle" being an undeclared identifier - i have looked in the help files to see if it would give any answer but as usual the help file is not very useful.

any ideas?
LVL 22

Accepted Solution

Mohammed Nasman earned 400 total points
ID: 6289040
Helli Winuser2000

  I went to computer have delphi2 and test the code, i'm sorry to tell you that not working with delphi 2 :(

 Open/save dialog, don't have the onshow event

also there's no handle for open/save dialog :((

  I tested my code with delphi5/6 and it's working fine, but with delphi two it will not work


Author Comment

ID: 6289052
Sheesh, story of my life finding out that it won't work.  Thanks for checking it out for me and for the help you gave.  I shall give you the points because you helped the most.
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6289077
thanks alot winuser2000, I don't deserve the points cuz i didn't solve ur problem

  there's also another way, using sendmessage and WM_SetText, but also require the handle, and that's not exist with opendialog in delphi2 :(

 try to check in torry.net site, maybe there's some free components can do that for you


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 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