Working with Graphic Objects


After you create graphic objects on your worksheet, you'll need to move them and format them. You can also control their protection attributes and specify the way objects respond to changes in the position of underlying cells. The following sections discuss the many ways you can use Office Excel 2007 to help you accomplish these tasks.

Selecting and Grouping Objects

image from book Sometimes you'll find it convenient to move, resize, or even reformat more than one object at a time. If you create a logo using multiple objects, for example, you will want to move all objects as a single unit, preserving their positions relative to one another. For these purposes, Excel includes the Group button in the Arrange group on the Page Layout tab, which is a menu containing the Group, Ungroup, and Regroup commands.

Note 

You can select multiple objects by clicking individual objects while holding down Shift. You can select all the objects on the current worksheet by clicking one to select it and then pressing Ctrl+A (Select All). You can also select all objects by clicking Home, Find & Select, Go To Special and then selecting the Objects option.

After you select a group of objects, you can lock them together either by using the Group button on the Page Layout tab or by right-clicking any of the selected objects, clicking Group, and then clicking one of the Group commands, as shown in Figure 10-41.

image from book
Figure 10-41: Select a group of objects, and then right-click any one of them to display a shortcut menu of applicable commands.

When you group objects, the sets of handles around each selected object are then replaced by a single set of handles for the entire group, as shown in Figure 10-41. After you group the objects, you can manipulate the set of objects as a single object. You can resize, move, and apply formatting to them as a group. When you apply formatting, however, the separate objects might behave differently, especially if you have grouped different kinds of objects with different formats. It's best to apply formatting before you group objects, unless the objects are similar.

To ungroup a set of objects, select the group, right-click, and then click Group, Ungroup. You can use the Regroup command to reconstitute the group of objects you most recently ungrouped. For example, this is handy if you ungrouped a set of objects to make changes to one or more of them. Rather than selecting them again and clicking Group, just click Regroup.

Note 

Unlike with other objects, when you click an object containing text and a dotted border appears around it, the text area-not the object-is selected. To select the object, click the border; when the border appears as a solid line, the object is selected. If you want to move an object containing text while its text area is active, you can drag it by its border.

Positioning Objects

image from book image from book Think of the objects on a worksheet as stacked on top of each other. Each new object you draw is placed on top of the stack. You can adjust the position of objects in the stack using the Bring To Front and Send To Back buttons in the Arrange group on the Page Layout tab. You can also right-click an object and then use the equivalent commands on the shortcut menu.

Figure 10-42 shows two identical sets of ungrouped objects. In the set on the right, we positioned the banner in front of the other objects in the stack using the Bring To Front button, and we positioned the star behind the other objects using the Send To Back button.

image from book
Figure 10-42: You can reposition objects in relation to each other using buttons in the Arrange group on the Page Layout tab.

As you can see in Figure 10-42, the Send To Back button is both a menu and a button-clicking the main part of the button issues the Send To Back command, while clicking its arrow displays a short menu. The same is true for the Bring To Front button. These mini-menus oiler the additional Bring Forward and Send Backward commands, which move the object higher or lower in the stack, one layer at a time.

image from book If you need to work with multiple objects on a worksheet, you can gain a little more control using the Selection Pane button. Click the Selection Pane button in the Arrange group on the Page Layout tab to display a task pane like the one shown in Figure 10-43.

image from book
Figure 10-43: Use the Selection And Visibility task pane to control the display of multiple objects.

You can use the buttons at the bottom of the Selection And Visibility task pane to show and hide all objects on the worksheet and to move selected objects up and down in the object stack. You can click the little eyeball icon to the right of an object name to hide that object; click again to unhide it. You can also edit the names of the objects by simply clicking the name once to select it and then clicking it again to edit its text.

Note 

The Selection Pane button is also available on the Format tabs under both Drawing Tools and Picture Tools; these tabs appear when you select a picture, a shape, WordArt, a text box, or clip art.

You can change the relationship of objects to the underlying worksheet using the options on the Properties tab in the Size And Properties dialog box. Right-click an object, and click the Size And Properties command to display the dialog box shown in Figure 10-44. For SmartArt objects, you'll find the command when you right-click the graphic frame; the command is not available for embedded objects.

image from book
Figure 10-44: You can control how objects respond to changes on the worksheet.

Note 

The Size And Properties dialog box is also available by clicking the Dialog Box Launcher in the Size group on the Format tabs under both Drawing Tools and Picture Tools; these tabs appear when you select a picture, a shape, WordArt, a text box, or clip art.

The default Object Positioning option is Move And Size With Cells, meaning that if you do anything to change the size or shape of the underlying cells, the object adjusts accordingly. An underlying cell is any cell whose right or bottom border is between the upper-left corner and the lower-right corner of the object. Here are some facts you need to know about the Object Positioning options:

  • If you insert columns or rows to the left of an object formatted with the Move And Size With Cells option, the object moves accordingly.

  • If you insert columns or rows between the first and last cells underlying an object formatted with the Move And Size With Cells option, the object stretches to accommodate the insertion.

  • If you select the Move But Don't Size With Cells option and then insert or delete columns or rows, the object moves but retains its shape and proportion.

  • If you select the Don't Move Or Size With Cells option, the object floats above the worksheet and isn't affected by any changes you make to the underlying cells.

  • The Print Object check box is ordinarily selected. If you turn it off, the selected object isn't printed when you print the worksheet.

Note 

In addition to moving and sizing objects with cells, Excel lets you control what happens when you cut, copy, or sort cells to which objects are attached. Click the Microsoft Office Button, click Excel Options, select the Advanced category, and in the Cut, Copy, And Paste group, select or clear the Cut, Copy, And Sort Inserted Objects With Their Parent Cells check box.

The Size tab in the Size And Properties dialog box offers precise control over the height, width, angle of rotation, scale, and cropping of the selected object. You can perform these tasks directly by dragging, but you might find it helpful to display the dialog box if you want to resize objects proportionally using the Lock Aspect Ratio option.

image from book
What Is Alt Text?

In Figure 10-44, notice that the dialog box contains an Alt Text tab. If you click it, you'll see that the only option is to add alternative text-known in Web parlance as alt text:

image from book

(Also notice in Figure 10-40 on page 385, the Format Object dialog box has a Web tab that does the same job for embedded objects.) When you save an Excel document as a Web page, graphics are converted to their Web-based equivalents. In HTML, the language of the Web, alternative text is added to images for four reasons. First, alt text appears in the browser while an image is loading, which is particularly helpful for large images over slow connections. Second, when you rest the pointer on an image containing alt text, the text appears in a pop-up window in your browser. Third, alt text is used by text-reading software commonly used by the blind, allowing them to hear a description of the image. And fourth, Web search engines index alt text along with the other "visible" text on your Web site, so descriptions added to images adds to the text indexed by Web search engines. If you're planning to save your workbook in HTML format, you should consider adding alternative text to all your graphics. For more information about Excel and the Web, see Chapter 25, "Collaborating Using the Internet."

image from book

Tools to Help You Position Objects on the Worksheet

image from book It's great to be able to create cool graphics with Excel, but the free-floating nature of graphic objects sometimes makes it hard to maintain a semblance of order on your worksheet. The Align button, in the Arrange group on the Page Layout tab, contains commands you can use to straighten up your worksheet, as shown in Figure 10-45.

image from book
Figure 10-45: Use the Align commands to straighten up objects.

Note 

You can also find the Align button on the Format tab under Drawing Tools; this tab appears when you select most types of objects (except embedded objects). The Align button also appears in its button-only form (without the word Align displayed) on the Format tab under Picture Tools, which appears when you select a bitmap image or clip art.

Suppose you have a number of objects that you want to be evenly spaced, like the ones shown in Figure 10-45. You can start by selecting the top row of objects, using the Align Top command to line them up, and then selecting Distribute Horizontally to space them evenly. Then you can use the other alignment and distribution commands to position the rest of the objects to your liking. Here are some key points to remember about using these object-positioning commands:

  • Snap To Grid Uses the columns and rows of the worksheet to align objects. Pre-existing objects don't line up with the grid when you choose this command, but as soon as you create or drag an object, it snaps to the nearest column and row borders. The Snap To Grid command is a toggle-that is, you click once to turn it on and click again to turn it off.

  • Snap To Shape Turns on the Snap To Grid command when you choose it, activating its functionality. It adds to the spreadsheet grid virtual gridlines tangent to the edges of any existing objects, making it easy to align objects to one another. If you turn off the To Grid command, the To Shape command is turned off as well. The Snap To Shape command is also a toggle.

  • The Align and Distribute commands Arrange the selected objects relative to each other. These buttons are available only when you select two or more objects.

  • Align Left/Right/Top/Bottom Lines up the edges of all selected objects with the corresponding edge of the leftmost, rightmost, top, or bottom object selected.

  • Align Center Lines up the centers of objects along a vertical axis and finds the average common centerline of all selected objects.

  • Align Middle Lines up the centers of objects along a horizontal axis and finds the average common centerline of all selected objects.

  • Distribute Horizontally/Vertically Calculates the total amount of space between the selected objects and divides the space as equally as possible among them. The first and last objects (leftmost and rightmost or top and bottom) do not move-all the objects in between are adjusted as necessary.

Note 

You can use the arrow keys on your keyboard to nudge selected objects 1 pixel at a time. If the Snap To Grid command is turned on, pressing an arrow key moves the selected object to the next gridline in that direction.

Protecting Objects

Objects are ordinarily prevented from being selected, moved, formatted, or sized. You can change this by right-clicking the object, clicking the Size And Properties command, and on the Properties tab, selecting or clearing the Locked check box. You can also select the Lock Text check box, which is available only when you select a text-capable object, to protect an object's text contents. Figure 10-46 shows the Properties tab. Newly drawn objects are assigned Locked status. However, to activate worksheet security and protection, you must also click Protect Sheet on the Review tab. For more information about protection, see "Protecting Worksheets" on page 156.

image from book
Figure 10-46: You can lock objects and the text they contain to prevent changes when the workbook is protected.

image from book
Controlling the Display of Objects

You might want to suppress the display of objects in a workbook for security reasons or to simply speed up scrolling on an older computer. To do so, click the Microsoft Office Button, click Excel Options, and select the Advanced category. In the Display Options For This Workbook area, the For Objects, Show All option is ordinarily selected. Selecting the Nothing (Hide Objects) option prevents both their display and printing.

Although you cannot directly modify objects when they are hidden, some actions still change them. If you select anything other than Don't Move Or Size With Cells on the Properties tab in the Size And Properties dialog box, hidden objects still respond to adjustments made to the column width or row height of underlying cells.

image from book



Microsoft Office Excel 2007 Inside Out
MicrosoftВ® Office ExcelВ® 2007 Inside Out (Inside Out (Microsoft))
ISBN: 073562321X
EAN: 2147483647
Year: 2004
Pages: 260

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