Board index » delphi » TOpenDialog - label and button captions

TOpenDialog - label and button captions

Hello,

can anyone tell me how to changes the text that appears in a TOpenDialog
dialog box. I.e. I want to change 'Look in', 'File Name' and all the
other text (including button captions) to custom values.

I think I have to change the dialogs.pas unit and recompile it, but I
cant find the places, where the resource string calls are made.

Thanks in advance.

Jens
--
**********************************
Jens Griep-Raming
Universit?t Oldenburg
FB 9 Chemie AG Metzger
Carl-von-Ossietzky-Stra?e 9-11
26129 Oldenburg
Germany
mailto:gr...@chemie.uni-oldenburg.de
Tel. +49 441-798-3731
FAX  +49 441-798-3329
http://welcome.to/metzger
**********************************

 

Re:TOpenDialog - label and button captions


Quote
Jens Griep-Raming wrote:

> Hello,

> can anyone tell me how to changes the text that appears in a TOpenDialog
> dialog box. I.e. I want to change 'Look in', 'File Name' and all the
> other text (including button captions) to custom values.

> I think I have to change the dialogs.pas unit and recompile it, but I
> cant find the places, where the resource string calls are made.

> Thanks in advance.

> Jens

Hi Jens,

changing the caption of the dialog box is easy, there is a property named
Title. Changing the caption of any other control is much more complicated. I
didn't test it again, but I think you have to
- use WinSight to find out the IDs of the appropriate controls
- in the OnShow event of the TOpenDialog use SetDlgItemText to change texts.

It's not easy, but I did it a long long time ago. Feel free to post again here
if this information is not enough, if you got no help from others or if you
need more input.

-Michael

Re:TOpenDialog - label and button captions


you might be able to inherit a new type of OpenDialog and just change the
properties you want...look into the Dialogs source code and see how the
Dialogs are written, then just go from there.  If you are not too familiar
with that kind of stuff, just ask.

Dan
DBr...@Chicopee.TurboCare.com

Quote
Michael Winter <win...@foni.net> wrote in message

news:37E6917B.3BABF6FE@foni.net...
Quote
>Jens Griep-Raming wrote:

>> Hello,

>> can anyone tell me how to changes the text that appears in a TOpenDialog
>> dialog box. I.e. I want to change 'Look in', 'File Name' and all the
>> other text (including button captions) to custom values.

>> I think I have to change the dialogs.pas unit and recompile it, but I
>> cant find the places, where the resource string calls are made.

>> Thanks in advance.

>> Jens

>Hi Jens,

>changing the caption of the dialog box is easy, there is a property named
>Title. Changing the caption of any other control is much more complicated.
I
>didn't test it again, but I think you have to
>- use WinSight to find out the IDs of the appropriate controls
>- in the OnShow event of the TOpenDialog use SetDlgItemText to change
texts.

>It's not easy, but I did it a long long time ago. Feel free to post again
here
>if this information is not enough, if you got no help from others or if you
>need more input.

>-Michael

Re:TOpenDialog - label and button captions


Quote
TurboCare Employee wrote:

> you might be able to inherit a new type of OpenDialog and just change the
> properties you want...look into the Dialogs source code and see how the
> Dialogs are written, then just go from there.  If you are not too familiar
> with that kind of stuff, just ask.

> Dan
> DBr...@Chicopee.TurboCare.com

Dan,

TOpenDialog is a wrapper around the Windows OpenFileDialog API. It is not a
Delphi form. Positions and captions of the controls are hidden deep in
ComCtrl32 (or so) .dll code. That's why thing are a bit more complictated.

Feel free to give us an example about how to change the caption of the left
top label ('&Suchen in:' in my german Windows, don't know the correct text in
english, maybe 'Search in' or 'Find in') into another text. That is what Jens
wants.

-Michael

Re:TOpenDialog - label and button captions


okay, point taken.

Quote
Michael Winter <win...@foni.net> wrote in message

news:37E69B8B.C951D2B0@foni.net...
Quote
>TurboCare Employee wrote:

>> you might be able to inherit a new type of OpenDialog and just change the
>> properties you want...look into the Dialogs source code and see how the
>> Dialogs are written, then just go from there.  If you are not too
familiar
>> with that kind of stuff, just ask.

>> Dan
>> DBr...@Chicopee.TurboCare.com

>Dan,

>TOpenDialog is a wrapper around the Windows OpenFileDialog API. It is not a
>Delphi form. Positions and captions of the controls are hidden deep in
>ComCtrl32 (or so) .dll code. That's why thing are a bit more complictated.

>Feel free to give us an example about how to change the caption of the left
>top label ('&Suchen in:' in my german Windows, don't know the correct text
in
>english, maybe 'Search in' or 'Find in') into another text. That is what
Jens
>wants.

>-Michael

Other Threads