Solved

Save Dialog

Posted on 2001-07-16
9
239 Views
Last Modified: 2010-04-04
Does anyone know how to change the text on the buttons in the SaveDialog under Delphi 2?
0
Comment
Question by:winuser2000
  • 4
  • 4
9 Comments
 
LVL 21

Expert Comment

by:gemarti
Comment Utility
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!



0
 

Author Comment

by:winuser2000
Comment Utility
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
0
 
LVL 22

Expert Comment

by:mnasman
Comment Utility
Hello

   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
0
 

Author Comment

by:winuser2000
Comment Utility
Thanks mnasman but there is no onshowevent for the savedialog in delphi 2as far as i can see.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 22

Expert Comment

by:mnasman
Comment Utility
Sorry winuser2000

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

Author Comment

by:winuser2000
Comment Utility
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?
0
 
LVL 22

Accepted Solution

by:
mnasman earned 100 total points
Comment Utility
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

0
 

Author Comment

by:winuser2000
Comment Utility
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.
0
 
LVL 22

Expert Comment

by:mnasman
Comment Utility
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

Mohammed
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now