Working with shape, text, and graphic objects

You can add shape, text, and graphic objects to forms and reports.

Shape objects, such as boxes, ellipses, and lines, can be used to contain other objects or to visually separate parts of a document. Text objects can be used to add labels, provide instructions, or create titles. Graphic objects can be used to enhance the visual appeal of buttons or the design of the document.

In this section, you'll learn about

  adding boxes, ellipses, and lines to forms and reports
  
  modifying lines
  
  adding text objects to forms and reports
  
  using word wrap with text objects
  
  editing text in a text object
  
  inserting fields into text objects
  
  changing text properties
  
  aligning and spacing text
  
  specifying how a text object grows
  
  adding graphic objects to forms, reports, and buttons
  
  sizing and moving graphics
  
  copying graphic objects to a file
  
  using raster operations
  
For more information about working with shape, text, and graphic objects, see "Reference: Working with shape, text, and graphic objects."

Adding boxes, ellipses, and lines to forms and reports

You can add a box, ellipse, or line around objects on a form or report to frame other design objects, or you can use them alone for visual impact.

To add a box to a form or report

1	Click Insert  Box.

2	Drag the box to the right spot on the form or report.

Drag any of the eight handles that surround the box to resize it.

Notes

  For more information about resizing a box, see "To change the size or shape of a design object."
  
  For more information about the properties available to boxes, ellipses, and lines, see "Object property reference."
  
Tip

  You can also insert a box by clicking the Box tool, dragging the button pointer into the form or report design window, and clicking the form or report. This places a box of default size at a predefined position on the form or report. You can move and resize the box as you want.
  
To add an ellipse to a form or report

1	Click Insert  Ellipse.

2	Drag the ellipse to the right spot on the form or report.

Drag any of the eight handles that surround the ellipse to resize it.

Notes

  For more information about resizing an ellipse, see "To change the size or shape of a design object."
  
  For more information about the properties available to boxes, ellipses, and lines, see the "Object property reference."
  
Tip

  You can also insert an ellipse by clicking the Ellipse tool, dragging the ellipse pointer into the form or report design window, and clicking the form or report. This places an ellipse of default size at a predefined position on the form or report. You can move and resize the ellipse as you want.
  
To add a straight line to a form or report

1	Click Insert  Line.

2	Drag the line to the right spot on the form or report.

Drag any of the eight handles that surround the line to resize it.

Notes

  For more information about resizing a line, see "To change the size or shape of a design object."
  
  For more information about the properties available to boxes, ellipses, and lines, see "Object property reference."
  
Tip

  You can also insert a line by clicking the Line tool, dragging the line pointer into the form or report design window, and clicking the form or report. This places a line of default size at a predefined position on the form or report. You can move and resize the line as you want.
  
Modifying lines

You can customize the display of lines on a form or report. You can make a straight line curved and you can straighten a curved line. You can also add arrows to straight lines and remove arrows from straight lines.

To make a straight line curved

1	Right-click the line, and click Properties.

2	Click the Style tab.

3	In the Line type area, enable the Curved option.

4	Drag an endpoint to adjust the angle of the curve. The direction of the curve depends on the direction in which you draw the line, on which endpoint you drag, and on the direction you drag the endpoint.

Tip

  You can experiment by dragging either endpoint to get the effect you want.
  
To straighten a curved line

1	Right-click the line, and click Properties.

2	Click the Style tab.

3	In the Line type area, enable the Straight option.

To add arrows to a straight line

1	Right-click the line, and click Properties.

2	Click the Style tab.

3	In the Line ends area, enable one of the following options:

  Arrow on one end-places an arrow on the end of the line. The arrow points in the direction you dragged to create the line.
  
  Arrow on both ends-places arrows on both ends of the line
  
To remove arrows from a straight line

1	Right-click the line, and click Properties.

2	Click the Style tab.

3	In the Line ends area, enable the No arrow option.

Adding text objects to forms and reports

You can add text objects to forms and reports. Text objects can be used to create labels, titles, and descriptions.

To add a text object to a form or report

1	Click Insert  Text.

This places a flashing cursor at a predefined position on the form or report.

2	Type in text.

After you have typed in text, you can resize the text tool by dragging any of the eight handles that surround the text object.

Notes

  For more information about resizing a text object, see "To change the size or shape of a design object."
  
  When word wrap is enabled, you can only resize the object horizontally. When word wrap is disabled, you cannot resize the text object. For more information about using word wrap, see "To enable word wrap."
  
Tip

  You can also insert a text object by clicking the Text tool, dragging the text pointer into the form or report design window, and clicking the form or report to place the text object. A single-row text object is created. It expands to the right until you press ENTER. The cursor then moves to a new line. As you continue typing, the text wraps automatically at the right border (which you defined by pressing ENTER) and continues to expand downward until you finish typing and click somewhere else. If you delete text, the text object shrinks in height to leave no empty space.
  
Using word wrap with text objects

You can specify word wrap for text objects in a form or report. This feature wraps text automatically at the object's right border. Word wrap creates a new line of text at the frame of the text object. If word wrap is not enabled, only one line of text can be displayed in the text object.

To enable word wrap

1	Right-click the text object, and click Properties.

2	Click the Text tab.

3	Enable the Word wrap check box.

Editing text in a text object

You can edit the text in text objects.

To edit text in a text object

1	Select the text object.

2	Press F2.

3	Use the Arrow keys to move the cursor to the place in the text you want to edit.

Note

  If the Fit text property for this object is enabled and the object contains no text, Paradox deletes the text object from the form or report. For more information about disabling the Fit text property, see "To specify how a text object grows."
  
Tip

  You can also edit text by double-clicking the text object to place the cursor in the text object, and then editing the text.
  
Inserting fields into text objects

You can insert fields into a text object in a form or report. This is especially useful in a report, because you can use this feature as a mail merge.

To insert a field into a text object

1	Double-click the text object to place the cursor in the text object.

2	Press F5 to insert an unlabeled, undefined field.

3	Define the field.

When you run the form or report, the text value of the field is extracted and wrapped in its position within the line of text. The text following the field value is correctly spaced.

Notes

  For more information about defining fields, see "Defining field objects."
  
  For more information about inserting fields into text objects, see "Example of inserting fields in a text object."
  
Changing text properties

You can change the properties of a text object. You can choose to change text properties for the entire text object, for just highlighted text, or for text that you are about to type. To add visual appeal to a form or report, you can change the text's font, color, point size, and style.

To change properties for an entire text object

1	Right-click the text object, and click Properties.

2	Edit properties for the text.

Changes are applied to all text in the text object.

Tip

  You can also change text font and style by using the text formatting toolbar
  
To change font properties for selected text

1	Select the text.

2	Right-click the selected text, and click Properties.

3	Click the Font tab.

4	Edit properties for the text.

The changes are applied only to the highlighted text.

Tip

  You can also change text font and style by using the text formatting toolbar
  
To change font properties for text you are about to type

1	Click within the text to place the cursor in the text object, but do not highlight any text.

2	Right-click the text object, and click Properties.

3	Click the Font tab.

4	Edit properties for the text.

The changes are only applied to any new text you type.

Tip

  You can also change text font and style by using the text formatting toolbar
  
Aligning and spacing text

You can align text on a form or report You can also specify how large you would like the spaces between lines to be.

To align text using the properties dialog box

1	Select the text.

2	Right-click the text, and click Properties.

3	Click the Text tab.

4	In the Alignment area, enable one of the following options:

  Left-lines up text at the left, with the right edge ragged
  
  Center-centers text in the middle of the object
  
  Right-lines up text at the right, with the left edge ragged
  
  Justify-spreads out text so that both the left and right margins are straight
  
Tip

  You can also align text by using the text formatting toolbar
  
To specify the line spacing for text

1	Select the text.

2	Right-click the text, and click Properties.

3	Click the Text tab.

4	In the Spacing area, enable one of the following options:

  1 line-places one line between each line of text
  
  1.5 lines-places one and a half lines between each line of text
  
  2 lines-places two lines between each line of text
  
  2.5 lines-places two and a half lines between each line of text
  
  3 lines-places three lines between each line of text
  
Note

  For more information about line spacing, see "Line Spacing property."
  
Specifying how a text object grows

Text objects in forms and reports grow and shrink to fit text differently, depending on how you create them. After you create a text object, you can specify how it resizes when the text within it grows and shrinks.

To specify how a text object grows

1	Select the text object.

2	Right-click the text object, and click Properties.

3	Click the General tab.

4	In the Design sizing area, enable one of the following options:

  Fixed size-wraps the text at the right border of the frame. The object does not grow or shrink to fit the amount of text it contains. If you want to change the size of the object, select it and resize it manually.
  
  Fit text-creates a single-row text object that expands to the right until you press ENTER, which moves the cursor to a new line. As you continue typing, the text wraps at the right border that you defined by pressing ENTER. The object grows or shrinks to fit the amount of text it contains.
  
  Grow only-creates a single-row text object that works like the Fit text option, except the object does not shrink when you remove text (unless you manually resize it using the handles). The most common use for this type of text object is for a field label in a table.
  
Note

  The Design sizing choices control only how the object grows in the design window, not what happens when you run the form or report.
  
Adding graphic objects to forms, reports, and buttons

You can place graphic images on a form, report, or button. After placing the object, you can insert a graphic in one of two ways. You can paste a graphic from a .bmp, .cdr, .cmx, .cpt, .emf, .eps, .gif, .jpg, .pcd, .pcx, .png, .tif, .wmf, or .wpg file, or you can copy and paste a graphic using the Clipboard.

To place a graphic object on a form or report

1	Click the Graphic tool.

2	Drag the graphic pointer into the form or report design window, and click the form or report to place the graphic.

The words Undefined graphic display in the graphic object.

Tips

  If you release the mouse button and the graphic object is not the size or shape you want, click and drag any of the eight handles that surround the object to resize it. For more information about resizing a graphic object, see "To change the size or shape of a design object."
  
  You can also insert a graphic object by clicking Insert  Graphic. This places a graphic object of default size at a predefined position on the form or report. You can move and resize the graphic as you want.
  
To place a graphic object in a button

1	Click the Graphic tool.

2	Drag the graphic pointer into the button, and click to place the graphic object.

Notes

  If the Contain objects option is not enabled, you will not be able to place the graphic object in the button. The object will be placed on top of the button. For more information about enabling the Contain objects option, see "To create a contained design object."
  
  For more information about the Contain objects property, see "Contain Objects property."
  
To place a graphic in a graphic object

1	Select the graphic object.

2	Right-click the graphic object, and click Paste from.

3	Choose the drive and folder where the graphic is stored.

4	Select the graphic.

5	Click Open.

Note

  When you define a graphic object, the graphic object is sized to fit and checks the object's Size to fit property. You must disable this property before you can resize the graphic object manually. For more information about sizing a graphic object manually, see "To size a graphic object manually."
  
To copy a graphic into a graphic object

1	Select a graphic, and click Edit  Copy.

2	Select the graphic object.

3	Right-click the graphic object, and click Paste.

Note

  If the Clipboard is empty, the Paste command is grayed.
  
Sizing and moving graphics

After a graphic has been placed in a graphic object, you can size the graphic object. You can also crop the graphic that is within the graphic object. You can move the graphic object to another spot on a form, report, or button.

To size a graphic object manually

1	Select the graphic object.

2	Right-click the graphic object, and click Properties.

3	Click the Design tab.

4	Enable the Size to fit check box.

5	Drag the handles to resize the graphic.

Tip

  If an OLE object or bitmapped image does not resize with handles, disable the Size to fit check box. 
  
To crop a graphic

1	Select the graphic object.

2	Right-click the graphic object, and click Properties.

3	Click the Design tab.

4	In the Design mode area, disable the Size to fit check box.

5	Click OK.

6	Drag one of the container's sizing handles until the container is smaller than the graphic it contains.

7	Click the graphic to select it.

The pointer changes to an open hand.

8	Drag the graphic around in the container to the position you want.

9	Resize the container to the size you want.

Note

  For more information about the Size to fit property, see "To size a graphic object manually."
  
To move a graphic

1	Click outside the graphic object.

2	Click the frame of the graphic until handles display around the object.

3	Drag the object to a new place.

Copying graphic objects to a file

You can copy and save a graphic to any file.

To copy a graphic object to a file

1	Click the graphic object.

2	Click Edit  Copy to.

3	Type a filename in the File name box.

4	Click Save.

Using raster operations

When you define a graphic object, you identify a source graphic (a file) to be placed in a destination (your computer's screen). Most often, Paradox assumes you want an unchanged copy of the source placed on the screen. Suppose, however, you want the source graphic and the screen to interact. You might want to make the source graphic transparent, to have the color of the page show through, or you might want to invert the color of the source graphic. To achieve these effects, use the graphic object's "Raster Operation properties."

Raster operations define how Paradox combines the source graphic with the destination, inverting, combining, including, or excluding colors to your specifications.

For more information about raster operations, see "Raster operations and their onscreen results" and "Demonstration of raster operations."

To choose a raster operation for a graphic object

1	Select the graphic object.

2	Right-click the graphic object, and click Properties.

3	Click the Raster operation tab.

4	From the Raster operation list, choose one of the following:

  Source copy-copies an unchanged source graphic to the destination
  
  Source paint-combines the source graphic and the destination using the Boolean OR operator
  
  Source and-combines the source graphic and the destination using the Boolean AND operator
  
  Source invert-combines the source graphic and the destination using the Boolean XOR operator
  
  Source erase-inverts the colors of the destination and combines it with the source graphic using the Boolean AND operator
  
  Not source copy-inverts the colors of the source graphic and copies it to the destination
  
  Not source erase-combines the source graphic and the destination using the Boolean OR operator
  
  Merge paint-inverts the colors of the source graphic and combines it with the destination using the Boolean OR operator
  
Note

  For more information about Raster operations, see Raster Operation property.
  
Reference: Working with shape, text, and graphic objects

This topic contains reference information pertaining to working with shape, text, and graphic objects.

Example of inserting fields in a text object

Suppose you want to include the following line in a report using the Customer and Orders tables, with a Customer  Orders data model and a blank design layout.

"You have placed X orders for a total of $X since you began doing business with us."

Raster operations and their on-screen results

The following table briefly describes each raster operation:

Raster operation	On-screen result

Source Copy	Copy an unchanged source graphic to the destination.

Source Paint	Combine the source graphic and the destination using the Boolean OR operator.

Source And	Combine the source graphic and the destination using the Boolean AND operator.

Source Invert	Combine the source graphic and the destination using the Boolean XOR operator.

Source Erase	Invert the destination and combine it with the source graphic using the Boolean AND operator.

Not Source Copy	Invert the source graphic and copy it to the destination.

Not Source Erase	Combine the source graphic and the destination using the Boolean OR operator.

Merge Paint	Invert the source graphic and combine it with the destination using the Boolean OR operator.

Demonstration of raster operations

To see the effects of these raster operations, open and run rasterop.fsl in your sample folder.




