I am making a multi-lingual (computer languages) notepad in WinForms. I have a menu strip with a toolstripmenuitem called “Languages” (Like the file, edit, view, ect.). When you click on “Languages”, there are several checkable menu items. I want to do this: when an item is clicked, it appears checked; and when the user clicks it again, it appears unchecked. How do I incorperate a compiler per language like java, c, c++, ect.
I am making a multi-lingual (computer languages) notepad in WinForms. I have a menu
Share
You don’t want a check, it doesn’t make sense to have more than one language checked. You need a radio button. You can get one by overriding the renderer for the menu strip. You’ll also need to handle the CheckedChanged event of the menu items so only one can be selected. This code will do the trick: