Working with Toolbars


Toolbars are the mainstay for performing functions quickly in almost every Windows program (you'll probably want to add them to your own programs at some point, and in Hour 9, "Adding Menus and Toolbars to Forms," you'll learn how). Every toolbar has a corresponding menu item, and buttons on toolbars are essentially shortcuts to their corresponding menu items. To maximize your efficiency when developing with Visual C# 2005, you should become familiar with the available toolbars. As your skills improve, you can customize existing toolbars and even create your own toolbars to more closely fit the way you work.

Showing and Hiding Toolbars

Visual C# includes a number of built-in toolbars you can use when creating projects. One toolbar is visible in most of the figures shown so far in this hour: the Standard toolbar. You'll probably want this toolbar displayed all the time.

The toolbars you'll use most often as a new Visual C# developer are the Standard, Text Editor, and Debug toolbars, and each of these is discussed in this hour. You can also create your own custom toolbars to contain any functions you think necessary.

To show or hide a toolbar, open the View menu and click Toolbars to display a list of available toolbars. Toolbars that are currently visible have a check mark displayed next to them (see Figure 2.6). Click a toolbar name to toggle its visible state.

Figure 2.6. Hide or show toolbars to make your workspace more efficient.


Did you Know?

You can also right-click any visible toolbar to quickly access the list of available toolbars.


Docking and Resizing Toolbars

Just as you can dock and undock Visual C#'s design windows, you can dock and undock the toolbars. Unlike the design windows, however, Visual C#'s toolbars don't have a title bar that you can click and drag when they're in a docked state. Instead, each docked toolbar has a drag handle (a vertical stack of dots along its left edge). To float (undock) a toolbar, click and drag the grab handle away from the docked edge. When a toolbar is floating, it has a title bar, which you can drag to an edge to dock the toolbar. This is the same technique you use to dock design windows.

Did you Know?

A shortcut for docking a floating toolbar, or any other floating window, is to double-click its title bar.


Although you can't change the size of a docked toolbar, you can resize a floating toolbar (a floating toolbar behaves like any other normal window). To resize a floating toolbar, move the pointer over the edge you want to stretch and then click and drag to the border to change the size of the toolbar.




Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net