Get Your Free xBlog!           Sponsored by Web hosting review           FREE Flash games           FREE File Hosting           

Pass4sure ex0-100 certification exam testing

The ToolStrip control is a host for ToolStripMenuItem controls that can be used to create toolbar-style functionality for your forms. Toolbars provide support for item reordering, rafting, and overflow of items onto the overflow button.646-204 225-030 000-253

Many tool strip items duplicate functionality of full-size Windows Forms controls such as ToolStripLabel, ToolStripButton, ToolStripTextBox, ToolStripComboBox, and ToolStripProgressBar. Tool strip controls that do not have analogous Windows Forms controls include ToolStripSeparator, ToolStripDropDownButton, and Tool-StripSplitButton.
You can display images on the ToolStripItems control with the Image property.
The ToolStripContainer control allows you to create forms that include support for rafting toolbars.

The ToolStripManager class is a static class that exposes methods for tool strip management. You can use the ToolStripManager.Merge method to merge tool strips.
Lesson Review
You can use the following questions to test your knowledge of the information in this lesson. The questions are also available on the companion CD if you prefer to review them in electronic form.

Creating and Configuring Menus 190-803 BI0-122 640-863
Menus have always been a part of Windows Forms applications. They give the user quick and easy access to important application commands in an easy-to-understand, easy-to-browse interface. The .NET Framework version 2.0 introduced MenuStrips, which allow the rapid creation of Forms menus as well as context menus (also known as shortcut menus, which appear when the user right-clicks an object). In this lesson, you will learn how to create menus and context menus and configure them for use in your application.

Creating Access Keys
Access keys enable you to access menu items by defining keys that, when pressed in combination with the Alt key, will execute the menu command. For example, if a File menu defines the F key as an access key, when Alt+F is pressed, the File menu will open. Menus that contain sub-menus open when the access key combination is pressed, and menus that invoke commands will invoke those commands. Note that the menu item must be visible for the access key to function. Thus, if you define an access key for an Open menu item that exists in the File sub-menu, the File menu must be opened first for the access key combination to function.
You can create an access key for a menu by preceding the letter you want to define the access key for with an ampersand (&) symbol. For example, to create an Alt+F access key combination for the File menu, you would set the FileToolStripMenuItem’s Text property to &File.
Creating Shortcut Keys
Unlike access keys, shortcut keys are a combination of keystrokes that allow direct invocation of a menu item whether the menu item is visible or not. For example, you might define the Ctrl+E key combination to be a shortcut key for the Exit menu command in the File menu. Even if the File menu is not open, Ctrl+E will cause the Exit menu command to be executed. Also, unlike access keys, you cannot create shortcut keys for top-level menus—you can create them only for items in sub-menus. 000-731 ex0-100 70-620
You can create a shortcut key at design time by setting the ShortcutKeys property in the Properties window. Clicking the ShortcutKeys property launches a visual interface than enables you to define a key combination. This interface is shown in Figure 4-5.
If you want to display the shortcut key combination next to the menu item, you can set the ShowShortcutKeys property of the ToolStripMenuItem control to True. You can also define a custom text to be shown instead of the key combination. If you want to define a custom text, you can set it in the ShortcutKeyDisplayString property.

Comments are closed.



•  FREE Blog Templates at Templatespin.com  • VPS Server •