DekGenius.com
[ Team LiB ] Previous Section Next Section

4.5 Summary

Almost all Windows applications provide menus, Because they are the easiest way to provide a wide array of functionality without cluttering up the user interface. In Windows Forms, menus are represented as hierarchies of objects, with each menu item represented by an instance of the MenuItem class. A simple event model is used to notify the program when the user makes a menu selection. Keyboard accelerators and shortcuts are handled automatically, and integrate into the same event model. Menu structures can be reused and extended through menu merging, and the basic appearance of a menu can be replaced by supplying owner-drawn menu items. Toolbars can provide easy access to frequently used menu items, allowing expert users to work with an application more efficiently. Although toolbar and menu events are handled separately, it is relatively easy to channel events from both into a single set of click handlers.

    [ Team LiB ] Previous Section Next Section