RadTextBoxContron control property change

6 posts, 0 answers
  1. hong
    hong avatar
    27 posts
    Member since:
    Oct 2018

    Posted 21 Feb Link to this post

    Hello everyone,

        When I run the RadTextBox Control program,I select the content of the control RadTextBoxControl,right-click will show copy,paste and other content,

    how to copy,paste and change the text showing different languages. Reference picture RadTextBoxControl.jpg

        

        

     

    Hello everyone

    When I run the RadTextBox Control program, I select the content of the control RadTextBox Control, right-click will show copy, paste and other content, how to copy, paste and change the text showing different languages.

  2. Hristo
    Admin
    Hristo avatar
    1506 posts

    Posted 22 Feb Link to this post

    Hi Hong,

    The control supports localization of the context menu and you can use it like this: 
    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            TextBoxControlLocalizationProvider.CurrentProvider = new MyTextBoxControlLocalizationProvider();
     
            InitializeComponent();
        }
    }
    public class MyTextBoxControlLocalizationProvider : TextBoxControlLocalizationProvider
    {
        public override string GetLocalizedString(string id)
        {
            switch (id)
            {
                case TextBoxControlStringId.ContextMenuCopy:
                    return "&Copy";
                case TextBoxControlStringId.ContextMenuCut:
                    return "Cu&t";
                case TextBoxControlStringId.ContextMenuPaste:
                    return "&Paste";
                case TextBoxControlStringId.ContextMenuDelete:
                    return "&Delete";
                case TextBoxControlStringId.ContextMenuSelectAll:
                    return "&Select All";
            }
     
            return base.GetLocalizedString(id);
        }
    }

    I hope this will help. Let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. hong
    hong avatar
    27 posts
    Member since:
    Oct 2018

    Posted 25 Feb in reply to Hristo Link to this post

    Hi  Hristo,

    Thank you very much, but the programming language I use is VB.net, and the example you give is C#; I can't translate the language

    into the solution to the problem I put forward. Do you have any other ways?

     

  4. Hristo
    Admin
    Hristo avatar
    1506 posts

    Posted 25 Feb Link to this post

    Hi Hong,

    We have an online VB.NET <--> C# converter: http://converter.telerik.com/ which will help you to convert the C# code to VB.

    Let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. hong
    hong avatar
    27 posts
    Member since:
    Oct 2018

    Posted 25 Feb in reply to Hristo Link to this post

    Hi  Hristo,

       Thank you very much, This problem has just been solved.I also have the same problem, that is, the RadGridview control will also occur, I hope you can help me solve it, thank you.

    Regards,

    Hong

  6. Hristo
    Admin
    Hristo avatar
    1506 posts

    Posted 25 Feb Link to this post

    Hello Hong,

    The RadGridView control can be also localized, we have a documentation article on the subject: https://docs.telerik.com/devtools/winforms/controls/gridview/localization/localization. Please also note that we try to keep the forum threads more or less focused on a single topic per control. In case you are having other questions consider posting them in a new thread.

    Regards,
    Hristo
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top