ToolStrip and MenuStrip controls Simple and common (RPM)

Source: Internet
Author: User

ToolStrip and MenuStrip are actually the same controls, because MenuStrip derives directly from ToolStrip. That is to say ToolStrip can do the work, MenuStrip can also complete.

ToolStrip ( tool linked fields) is ToolStripButton, Toolstripcombobox, Toolstripsplitbutton, ToolStripLabel, Containers for Toolstripseparator, Toolstripdropdownbutton, Toolstripprogressbar, and Toolstriptextbox objects.

MenuStrip: (menu)

This class provides a menu system for the form.

ContextMenuStrip

Represents a shortcut menu that is displayed when a user clicks the right mouse button on a control in a form or a specific area. Shortcut menus are typically used to combine different menu items from one menustrip of a form, making them easier for users to use in a given application context. It is a container for ToolStripMenuItem, Toolstripcombobox, Toolstripseparator, and Toolstriptextbox objects.

ToolStripMenuItem

Describes the functionality of the ToolStripMenuItem class, which represents an optional option that is displayed in MenuStrip or ContextMenuStrip.

Toolstripcombobox Displays an edit field that is combined with a ListBox so that the user can select or enter new text from the list. By default, Toolstripcombobox displays an edit field that comes with a hidden drop-down list.

Toolstripseparator represents a line that is used to group ToolStrip items or drop-down items for MenuStrip, ContextMenuStrip, or other ToolStripDropDown controls. The toolstripseparator automatically sets the spacing according to its container and directs horizontally or vertically. Enter (-) to produce the product.

Toolstriptextbox

control allows the user to enter text in the application. Typically, theToolstriptextbox control is used to display a single line of text or to accept a single line of text as input.

Example: http://www.cnblogs.com/scottckt/archive/2007/11/21/967719.html

MenuItem commonly used in metal

Shortcutkeys

shortcut keys, User can press it to execute the Response menu command

Showshortcutkeys

Determine if the application program runs on the menu when the shortcut is displayed

Diplaystyle

Menu items can be displayed image and text name

Checked

Menu items can have a duplicate box, and a tick will be shown when you tick. When True, a tick is displayed.

CheckOnClick

True, When you click on it, you will automatically tick or withdraw the menu item.

ToolTipText

Specify a tooltip. When you park the mouse cursor   sowing over the menu, you will be prompted to do so automatically.

mdiwindowlistitem

MenuItem and menu option

Mergeaction

Specify a menu item to be combined with another menu and how to do it. Values are:

Append: The menu item is placed on the last position of the menu

Isnsert: Inserted in front of a menu of sufficient conditions, which can be the index of text or menu items on a menu item

Matchonly: Need to match, but do not insert menu items, set as matchonly menu items can not be moved between the menu.

Remove: Remove the full-condition menu item to insert the new menu

Replace: Add a menu item to the next menu item after replacing it.

Mergeindex

Indicates the position of the menu item relative to the other menu items to be combined. If you want the control to fit the order of the menu, set this to a value greater than or equal to 0, or set it to 1. This value is checked if it is not-1, which is used to match the menu instead of the text.

AllowMerge

Whether it is allowed to fit and

Other:

1) &: A letter of the & character Fu Yun You use the keyboard to access the pre-menu item by pressing the & letter when you hold down the ALT key. When ALT is pressed, the F of file opening shows a line. If you enter &file in MenuStrip, the File menu is displayed on MenuStrip, and when you press ALT, F shows a line.

2) Enter the "-" will become a menu separator

3) display all open windows in the menu. In the top menu, set the Mdiwindowlistitem as the menu to be displayed.

toolstripmenuitem commonly used in metal

DropDownItems

Returns a collection to be used as a drop-down menu related to a menu

ToolStripMenuItem Common Events

Click

Single click event

Checkedchangeed

When you click on a menu with CheckOnClick, this event is introduced

Common components of the ToolStrip control

Gripstyle

4 vertically arranged points are displayed on the leftmost side of the tool linked fields. Hidden fences lattice, the user can not move the tool linked fields  

Layoutstyle

Control tool linked fields on how to display, default level displayed

Items

contains a collection of tools linked fields all items

Showitemtooltip

Whether to allow ToolTips on tool linked fields

Raft

Specify a container that contains ToolStrip, It can locate ToolStrip in the dialog box, other values are none,top,bottom,left and right

Stretch

Implicitly, the tool linked fields is slightly higher or slightly more forgiving than the one contained therein. For true, the tool linked fields will occupy the length of its container.

ToolStrip's

ToolStripButton

buttons, with text or without text keys

ToolStripLabel

tags. This control can display images, which can be used to display a static image, placed on another control that does not display its own information.

Toolstripsplitbutton

Show a button on the right with a pull-down button, click the button, and you'll see the menu below it. If you click the button itself, the menu will not open

Toolstripdropdownbutton

Like Toolstripsplitbutton, the only area is to remove the drop-down button and replace it with a drop-down image. Click the button itself, will also open its menu

Toolstripcombobox

Show a combo box

Toolstripprogressbar

Embed an import article

Toolstriptextbox

Show a text box

Toolstripseparator

Horizontal OR vertical separators

StatusStrip (Task linked fields) represents a linked fields at the bottom of the dialog box

StatusStrip can use Toolstripdropdownbutton,toolstripprogressbar and Toolstripsplitbutton outside, You can also use the StatusStrip control: Statusstripstauslabel, which is an implicit item.

AutoSize

AutoSize is open in a state of default, which is not very straightforward, because when you change the text of a state linked fields, you do not want the label to move back, unless the signature is static, it should always be changed to false, and the

Doubleclickenable

Whether the DoubleClick event was introduced.

ToolStrip and MenuStrip controls Simple and common (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.