Previous | Table of Contents | Next

Page 322

The color tools are used to color each of the three components. The top tool is the Fill Color tool and colors the item fill. The middle tool is the Line Color tool and colors the border or surrounding line. It may also be used to color any line drawn on the canvas. The bottom tool is the Text Color tool, which colors text. The three tools allow the developer to color components separate from each other.

Using the Color ToolsYou color items by first selecting the item on the canvas, and then selecting the appropriate color tool, which brings up a color palette. You then select the appropriate color by clicking the color button. This closes the palette and changes the color of the selected item. Figure 13.42 shows the Fill color palette. The cursor is shown as a white arrow. The color button on which the cursor is positioned to pick is raised. It lowers as the cursor is moved. As the cursor is dragged across the palette, other color buttons are raised. You click the color button to color the fill area with the selected color.

NOTE
You may practice the coloring techniques on the SHAPE.FMB or the EMPCH13.FMB files contained on the CD. The EMPCH13 file can be executed. It will show you what colored text will look like when records are fetched into the form.

In Figure 13.41, you might notice the display windows to the left of the color tools. These are the selected color windows. As you drag the cursor across the palette, the color in the window changes. When the palette is closed, these windows show the color of each component for the selected item. In addition, above the tools is an area with a "T." This area also shows the component color. The "T" represents the color of the text. In the case of Figure 13.41, the text color is black. Two boxes surround the figure "T." The inner box represents the fill color. In the example, it is a red color or the color of the raised button on the palette. The outer box is the line or border color. The selected color is black.

Using the Color Palette Options At the bottom of the three palettes are several options. The Fill tool has three, the Line tool two, the Text tool one. The Tear Off Palette option, available on each of the three palettes, is used when the developer wants the palette to remain open. The feature is useful when the developer wants to color a number of items. When the palette is in the normal mode, it closes after each selection. When the palette is in the Tear Off mode it remains open. You can select this option by clicking the Tear Off Palette button on the palette. This causes the button to disappear and the palette to turn into a dialog box with a title. The dialog box can then be selected and dragged to any location on the screen. Figure 13.42 shows the Fill Color palette after the option has been selected and dragged to another area.

FIG. 13.42
The Fill Color Palette
after you have selected
the Tear Off Palette
button.


Page 323

The No Fill and No Line options are on the Fill palette and Line palette, respectively. When you select these options, the fill or line will be transparent.

NOTE
I generally select these two options for any boilerplate text I place on a form. I make the line or border transparent. I think the text is more readable without an enclosing box. I also shut the fill off because it makes the text look like it was written directly on the canvas.n

Using the Fill Pattern OptionThe last option appears on the Fill palette (see Figure 13.43). It is the Pattern option, which places a pattern in the fill area of an item. Clicking this option brings up the Fill Pattern palette, which has three sections. These sections consist of the pattern, the foreground color, and the background color.

The top section contains the various patterns available. As the cursor moves over the pattern button, the button raises, indicating that this is the pattern that can be selected. The pattern is also displayed in the Fill boxes on the Tool palette. When you click a button, the selected object's fill area receives the pattern.

At the bottom of the Fill Pattern Palette are two arrows used to color the background and texture portions of the fill area. The left arrow, when selected, opens a color palette that colors the texture portion of the pattern. The right arrow opens a color palette that colors the background portion of the pattern.

FIG. 13.43
The Fill Pattern Palette
and the texture color
palette.


Canvas Properties

The canvas is the Forms object that holds the objects that interact with the user. It is where you place the text items, buttons, or other objects. Before you can begin formatting the objects placed on the canvas, however, some of the Canvas properties need to be reviewed and updated.

Page 324

You read earlier that most of the objects in a Form have properties. A property is a value that controls an attribute of an object. For example , each form has a number of items. One of the properties of an item is Item Type. The valid values for this property are as follows:

The Item Type property or attribute determines the item. Objects have a variety of properties that determine what the object is, the color of the object, or a host of other attributes. Because the canvas is an important Forms object, it has a set of properties that control it.

Opening the Canvas Property Sheet

You can edit Object properties by opening the object's property sheet. Do this by using one of the methods in the following list:

NOTE
You can open the property sheet for most objects by using any of the three methods. However, you can open the canvas property sheet by using only the third method.

The Canvas Property Sheet

A property sheet contains several sections. At the top are series buttons, the first two of which copy and paste properties from one property sheet to another. The remainder of the buttons are discussed in Chapter 15 during a discussion of property classes. Below the buttons is the name of the object and an update window. The window changes property values and contains the value of the property currently selected. In Figure 13.44, the Font Style property is selected.The value in the update window pertains to this property. When one of a specific set of values can be selected, a pick list arrow appears to the right of the update window. This opens a pick list or list of values displaying the various settings. Below the update window are the properties.

Previous | Table of Contents | Next