Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Localizing default context menu of TEdit box. (Cut, Copy, Paste,Select All)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: May 3, 2017 10:44 AM Last Post By: Remy Lebeau (Te...
nilesh shinde

Posts: 47
Registered: 10/5/13
Localizing default context menu of TEdit box. (Cut, Copy, Paste,Select All)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 3, 2017 12:22 AM
Hi ,

I want to localize default menu of TEdit box contains menu options Cut, Copy, Paste,Select All. Please help me to do this. For localizing UI control's caption I do have language file (.ini file) and contains string entries like below. This works fine. But I am unable to localize default context menu of TEdit box. How I can add entry in language file so that this menu will be localized?

Form.FileMenu.Caption=&File
Form.FileLogin.Caption=&Login...
LoginForm.UsernameLabel.Caption=&User Name:
LoginForm.PasswordLabel.Caption=Pass&word:

Or how I can disable this context menu?

Thanks,
Nilesh
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Localizing default context menu of TEdit box. (Cut, Copy, Paste,SelectAll)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 3, 2017 10:44 AM   in response to: nilesh shinde in response to: nilesh shinde
nilesh wrote:

I want to localize default menu of TEdit box contains menu options
Cut, Copy, Paste,Select All.

Those menu items are provided by the OS itself, not the VCL. The only way
to localize them is to replace the default popup menu with a custom popup
menu that has its own menu items to replicate those actions manually, and
then you can localize your own menu items as needed.

For localizing UI control's caption I do have language file (.ini file)
and contains string entries like below. This works fine. But I am
unable to localize default context menu of TEdit box.

Because it is not subject to any localization efforts your app performs.
It is localized by the OS itself, based on the OS's own language settings.

How I can add entry in language file so that this menu will be localized?

You can't.

Or how I can disable this context menu?

Assign your own TPopupMenu to the TEdit::PopupMenu property.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02