![]() Initializes a new instance of the ToolStripMenuItem class that displays the specified text. Initializes a new instance of the ToolStripMenuItem class that displays the specified Image. Initializes a new instance of the ToolStripMenuItem class. ToolStripMenuItem replaces and extends the MenuItem control, which was removed in. Use the ShortcutKeys property to define a keyboard combination that can be pressed to select the menu item. For example, if you have a set of menu items for setting the color of text in a TextBox control, use the Checked property to identify which color is currently selected. ![]() Use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. To display a check mark next to a menu item, use the Checked property. The ToolStripMenuItem class provides properties that enable you to configure the appearance and functionality of a menu item. In order for a ToolStripMenuItem to be displayed, you must add it to a MenuStrip or ContextMenuStrip. ![]() ToolStripMenuItem is a ToolStripDropDownItem that works with ToolStripDropDownMenu and ContextMenuStrip to handle the special highlighting, layout, and column arrangement for menus. Tsmi.ShortcutKeyDisplayString = "Merged Item" ' Distinguish the merged items by setting the shortcut display string. Distinguish the merged items by setting the shortcut display string.įoreach (ToolStripMenuItem tsmi in cmsItemsToMerge.Items) This code example is part of a larger example available in the ToolStripManager class overview. The following code example adds a ShortcutKeyDisplayString to the specified menu items of a ContextMenuStrip. ToolStripItemDesignerAvailabilityAttribute Examples
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |