![]() ![]() You can show a ContextMenuStrip programmatically by using the Show method. You can associate a ContextMenuStrip with any control, and a right mouse click automatically displays the context menu (or shortcut menu). They are available by default at design time for the StatusStrip control:ĬontextMenuStrip replaces ContextMenu. The following items are specifically designed to work seamlessly with both ToolStripSystemRenderer and ToolStripProfessionalRenderer in all orientations. Special features of StatusStrip include a custom table layout, support for the form's sizing and moving grips, and the Spring property, which allows a ToolStripStatusLabel to fill available space automatically. StatusStrip replaces the StatusBar control. They are available by default at design time for the MenuStrip control: ![]() Functionally, ToolStripDropDownItem and ToolStripMenuItem work along with MenuStrip, although they are derived from ToolStripItem. It also provides key handling and multiple document interface (MDI) features. MenuStrip is the top-level container that supersedes MainMenu. They are available by default at design time for the ToolStrip control: These are the items that are not currently in an overflow menu. ![]() In a class derived from ToolStrip, you can also use the DisplayedItems property to access only those items that are currently displayed. You can access all the items in a ToolStripDropDownItem through the DropDownItems collection. You can access all the items in a ToolStrip through the Items collection. The following object model shows the ToolStrip inheritance hierarchy. ToolStrip is the abstract base class for MenuStrip, StatusStrip, and ContextMenuStrip. The following topics describe ToolStrip and the controls that derive from it. These classes are all contained in the namespace and they are all typically named with the "ToolStrip" prefix (such as ToolStripOverflow) or with the "Strip" suffix (such as MenuStrip). The ToolStrip and ToolStripItem classes provide a flexible, extensible system for displaying toolbar, status, and menu items. ![]()
0 Comments
Leave a Reply. |