Previous | Table of Contents | Next

Page 325

Figure 13.44 contains a typical canvas property sheet.

FIG. 13.44
A typical canvas
property sheet.


Table 13.1 contains a description of the various canvas properties.

Table 13.1 Canvas Properties


Property Description
Background Color The color of the canvas.
Bevel Determines the appearance of the canvas edge. The raised setting makes the canvas appear that it is above the overlaying object. The lowered setting makes it appear it is lower. The none setting causes no bevel to appear.
Canvas-View Type The type of canvas or view. The options are: content, stacked, vertical toolbar, and horizontal toolbar. Content is the default. It indicates that the canvas is a base canvas. The stacked setting indicates that the canvas can be displayed over a content canvas. A vertical toolbar is a vertical canvas that contains buttons or tools. A vertical toolbar is a horizontal canvas that contains buttons or tool. The toolbar canvases also overlay the content canvas.
Charmode Logical Attribute Specifies the name of a character mode logical attribute defined in an Oracle Terminal resource file.
Class The name of the property class supplying values to the canvas properties.
Comment This property records pertinent information about the canvas. When you select this property, a special button

Page 326

Table 13.1 Continued


Property Description
appears on the right of the update window. Clicking this button opens the default text editor. This property is seldom if ever used.
Direction Specifies the layout direction for bi-directional objects.
Displayed This property determines whether the canvas is displayed. The values are true and false.
Display X Position The X coordinate for a stacked canvas's top-left corner.
Display Y Position The Y coordinate for a stacked canvas's top-left corner.
Fill Pattern The pattern used on the canvas.
Font Name The default font for all items placed on the canvas.
Font Size The default font size for all items placed on the canvas.
Font Style The default font style for all items placed on the canvas.
Font Weight The default weight for all items placed on the canvas.
Font Width The default font width for all items placed on the canvas.
Foreground Color The color of the canvas foreground.
Height The height of the canvas.
Name The name of the canvas.
Raise on Entry Determines how Forms displays the canvas when the operator navigates to an item on the canvas. It is used when a window displays multiple canvases. A value of false raises the view to the top only if the target item is behind another view. A value of true always raises the canvas to the top when navigating to an item.
View Height Determines the height of the view. This property is used when the canvas-view type is stacked.
View Horizontal Scroll Bar Determines whether the horizontal scroll bar will be visible. This property is used when the canvas-view type is stacked.
View Vertical Scroll Bar Determines whether the vertical scroll bar will be visible. This property is used when the canvas-view type is stacked.
View Width Determines the width of the view. This property is used when the canvas-view type is stacked.
White on Black Specifies that the object is to appear on a monochrome bitmap display device as white text on a black background.

Page 327


Property Description
Width The width of the canvas.
Window The name of the form window that will display the canvas.
Visual Attribute Name The name of the visual attribute supplying values for the font, background, and foreground properties.
X Position on Canvas Determines the X coordinate of the top- left corner of the canvas.
Y Position on Canvas Determines the Y coordinate of the top- left corner of the canvas.

Reviewing and Setting Canvas Properties

Several canvas-view settings should be reviewed on each form. The first is Canvas-Type. The developer needs to determine whether the canvas is a content type or stacked. Content type canvases are base canvases and completely replace underlying canvases. Only one content canvas can be shown at a time. Stacked canvases can be displayed over a content canvas. Stacked canvases can be displayed without entirely covering a content canvas.

The developer also needs to check the width and height settings. When the form window is fully maximized, the canvas may not completely cover the window. The resolution of the monitor controls the size of the displayed area. Higher resolution screens will show a canvas in a smaller area than lower resolution. The developer should always determine whether the content canvas is the proper size. If the canvas is stacked, the developer must also determine the desired size of the canvas.

The final setting on the canvas is the Background Color. Canvases can be colored to improve their presentation. Selecting the Background Color property causes a pick list button to appear on the right of the update window. When you select the pick list, it brings up the Colors dialog box as shown in Figure 13.45. The developer can scroll through the box until the desired color is identified. Selecting the color and clicking the OK button changes the color of the canvas.

FIG. 13.45
The Color dialog box.


Page 328

TIP
When you attempt to change the color of the background, you get a Dialog box that identifies various colors with a value formatted similar to "r0g80b88." The number represents a blend of red, green, and blue. I find it extremely difficult to determine the color I want by using this number.
To identify the color I want and its number, I use the Layout Editor. To do so, I open the color palette and place the cursor over the desired color. Its number is visible on the bottom-left of the screen, as shown in Figure 13.46. Copy this number down, return to the property sheet, and select the number for the Color dialog box. This method will save you a lot of trial and error.

FIG. 13.46
Identifying the color
number by using the
color palette on the
Layout Editor.


Defining Window Properties

Another Form object that should be reviewed during the formatting procedure is the Window. A window is the shape or frame that appears over the canvas and controls the amount of canvas that you can see. When the canvas is wider than the window, a horizontal scroll bar appears. This allows the user to view hidden parts of the canvas. When the canvas is longer than the window, a vertical scroll bar appears. When the canvas and the window are the same size, no scroll bars appear.

Table 13.2 contains a list and description of the various window properties.

Table 13.2 Window Properties


Property Description
Background Color The color of the background.
Bevel Determines the appearance of the window edge. The raised setting makes the window appear as if it's above the

Previous | Table of Contents | Next