Click here to Skip to main content
16,008,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi All
i have a textbox control. When i right click on it, A ContextmenuStrip is showed.
I want to change language on that ContextMenuStrip. but i do not know what should i do. Can you help me please?.
can you give me demo or document this problem.

Thanks
Posted
Comments
Naz_Firdouse 15-Apr-13 7:27am    
language change in the sense do you want to show data in another language?
Maciej Los 15-Apr-13 7:27am    
Not clear. Please be more specifc and provide more details. Shortly describe your needs.
Specify library: WinForms, WebControls, WPF?
Use "Improve question" widget.

1 solution

For Win forms you can do something like this

C#
private void Form1_Load(object sender, EventArgs e)
        {
            ContextMenuStrip contextMenu = new ContextMenuStrip();
            //adding menu item
            contextMenu.Items.Add("Item 1");
            //adding second menu item with an event handler attached
            contextMenu.Items.Add("Change language");
            contextMenu.Click += contextMenu_Click;

            txtTest.ContextMenuStrip = contextMenu;
        }

        void contextMenu_Click(object sender, EventArgs e)
        {
            //do your stuff here
            MessageBox.Show("You clicked on change language menu item");
        }
 
Share this answer
 
Comments
bongden27 15-Apr-13 22:21pm    
Thanks, I know this solution what you describe. But i do not want to change ContextMenuStrip.i only change language of default ContextMenuStrip.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900