Dev6
asked on
replacing consts.pas
i would like to generate my own consts.pas because i use the english version of delphi but need a german application.
Therfore i would like to replace some text in that consts, but it didn't work.
For example.
In english the
SmkcCtrl = 'Ctrl+';
i changed to
SmkcCtrl = 'Strg+';
but the menus still shows "Ctrl+A"
how can i make this work ?
regards
Andreas
Therfore i would like to replace some text in that consts, but it didn't work.
For example.
In english the
SmkcCtrl = 'Ctrl+';
i changed to
SmkcCtrl = 'Strg+';
but the menus still shows "Ctrl+A"
how can i make this work ?
regards
Andreas
Not sure if this is your problem but if you don't recompile the Consts.pas, and replace the one in $(DELPHI)\lib with the new one you will never get it to work.
Hope it helps a bit..
Regards
//raidos
Hope it helps a bit..
Regards
//raidos
ASKER
@kretzschmar: I don't think it is retrieved from OS, because i use a german OS and english Delphi, but still get Ctrl instead of Strg !
How can i recompile the consts.pas ?
i just changed the original consts.pas ...
How can i recompile the consts.pas ?
i just changed the original consts.pas ...
>i use a german OS
doesn't matter
doesn't matter
but i may wrong, of course
there is api-call,
which returns the name,
just test it
more this evening
there is api-call,
which returns the name,
just test it
more this evening
ASKER
the problem is, i don't need a API-call, but if i set the shortcut property of a menuitem or action, i get 'CTRL-A' this isn't from the OS, because all other applications (they are german) are using 'STRG-A'
hmm...well...i guess simply renaming $(DELPHI)\lib\consts.dcu to something else would force delphi to recompile the Consts.Pas...if not you might have to include the path to it in your Environment, or simply move consts.pas to $(DELPHI)\lib
Regards
//raidos
Regards
//raidos
ASKER
i just deleted all consts.pas and consts.dcu i found on my system and only the one consts.pas exists (with the german text) but it doesn't work.
i put the menus.pas into my project directory.
MenuKeyCaps: array[TMenuKeyCap] of string = (
SmkcBkSp, SmkcTab, SmkcEsc, SmkcEnter, SmkcSpace, SmkcPgUp,
SmkcPgDn, SmkcEnd, SmkcHome, SmkcLeft, SmkcUp, SmkcRight,
SmkcDown, SmkcIns, SmkcDel, SmkcShift, SmkcCtrl, SmkcAlt);
This is the array, which holds all the Special Text for the menus, but the Smk... are defined in the consts, and there are allready the right values. But at runtime, the array holds for the Ctrl key 'Ctrl+'
Why ?
i put the menus.pas into my project directory.
MenuKeyCaps: array[TMenuKeyCap] of string = (
SmkcBkSp, SmkcTab, SmkcEsc, SmkcEnter, SmkcSpace, SmkcPgUp,
SmkcPgDn, SmkcEnd, SmkcHome, SmkcLeft, SmkcUp, SmkcRight,
SmkcDown, SmkcIns, SmkcDel, SmkcShift, SmkcCtrl, SmkcAlt);
This is the array, which holds all the Special Text for the menus, but the Smk... are defined in the consts, and there are allready the right values. But at runtime, the array holds for the Ctrl key 'Ctrl+'
Why ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't know why, but now i work ...
I put the file into the project path ...
and it works ...
thanxs
I put the file into the project path ...
and it works ...
thanxs
the hotkey-shortcut
is retrieved from the os
at runtime