Using Graphic Objects on Forms

In addition to adding graphics to tables on a form or to creating a graphic background for the form, graphic objects can be added to forms in three ways. You can copy the object to the Clipboard and paste it into a form, you can import the image file, or you can create and use a shared image resource. In general, it is best to import the file or use a shared image resource. When the graphic object is stored on the form, you can manipulate it using the Picture menu. You can also resize these embedded graphic objects.

To import an image, position the cursor at the desired location and choose File, Import from the menu. Select the image type and the image, and click Import. To use a shared image, choose Create, Image Resource from the menu. When you have added the image to a form, you can work with it in either the Picture menu or the Picture properties box (see Figure 5.18).

Figure 5.18. You can enter alternative text for deferred and Web loading in the Picture properties box. Note the caption Earth.

When you add an image to your form and subsequently select the image, a menu called Picture is added. This menu has several prompts, as shown in Table 5.4.

Table 5.4. Picture Menu Prompts

Prompt Effect
Picture Properties Displays the Picture properties box
Replace Picture Displays the Import Picture dialog box, allowing you to replace the image
Add Hotspot Rectangle Adds a rectangular hotspot area
Add Hotspot Circle Adds a circular hotspot area
Add Hotspot Polygon Adds an irregularly shaped hotspot area
Add Default Hotspot Adds a default hotspot that contains the entire image area
Hotspot Properties Presents the Hotspot properties box
Delete Selected Hotspot Removes the selected hotspot

The extensive support for hotspots enables you to build forms and pages that can be used as image maps in Web applications. (For more information on creating hotspots and image maps, see Chapter 8, "Using the Page Designer.")

The Picture properties box has tabs for Picture Info and Picture Border in addition to the standard Paragraph Alignment, Paragraph Margins, Paragraph Hide-When, and Paragraph Styles tabs. The last tab is labeled Picture Extra HTML, but it is the standard HTML tab dialog box.

The Picture Info tab has settings for Source (click the Browse or Formula buttons to use shared resources), Text Wrap, Alternate Text, Caption, and Hotspots. For Text Wrap, you can choose from the following settings:

To resize the picture, you can click the image and use the drag handle in the lower-right corner of the image, or you can type values directly into the Width and Height fields in the Scaling (%) section. (Note that these values are in percentages, not in pixels.) The percentage is in relationship to the original image size as stored in either a shared image resource or the file system. If you decide that you don't like the new size, you can revert to the original size by clicking the Reset button.

You can add alternative text and captions to images. Any text entered in the Alternate Text field is shown when the browser can't load the image. When text is entered in the Caption field, an additional field appears specifying where the caption is to appear. Captions can be placed below an image or centered on an image.

Hotspots can be added to the image and programmed. A hotspot can be a part of the image or the entire image. (You can read more about adding hotspots in Chapter 8.)

The Picture Border tab lets you choose a border style, add a drop shadow, and change the inside, thickness , and outside border widths. The Picture Border tab operates just like the Table Border tab described earlier in the section "Working with Table Borders."

Категории