Find more freelance jobs
|
24
With BOX, you can make only absolute size specifications. BOX HEIGHT, for example, overrides the default height setting to the height of the current window. With SIZE, you can adjust the size of a box or a line with respect to its previously-set dimensions. The following commands would, for example, draw a frame 1 CM in from the margins of the paper: /: POSITION PAGE /: POSITION XORIGIN 1 CM YORIGIN 1 CM /: SIZE PAGE /: SIZE HEIGHT '-2' CM WIDTH '-2' CM 3.2.5 Using the Commands in Texts and Forms Since BOX, POSITION, and SIZE are text commands, you can insert them directly in a text. However, usually you use these commands in forms, where you have better control of how a box or line and the accompanying text fit together. SAPscript does not automatically fill text into a box or otherwise orient text with respect to these graphical elements. Enter the following line as a command in text in a SAPscript document. The command draws a box of 17.5 CM length, 1 CM high, with 10% shading: /: BOX WIDTH '17.5' CM HEIGHT '1' CM INTENSITY 10 The left upper corner of the box is located at the left upper corner of the main window defined in the form of the document. The text that you type in is not automatically oriented in accordance with the box. Whether the text fits in the box or not depends on you. If you type in three lines of text, then the bottom line of text is likely to appear below the bottom of the box. In a form, you can orient both text and graphical elements in the windows that you define. You therefore have much better control of how graphics and text fit together. 3.2.6 Tips and Guidelines To ensure in forms that boxes, lines, and shading fit correctly with text, follow these guidelines: · In your form design, match graphical elements and windows to each other. By default, a box defined in a window has the dimensions and starting point of the window. Defining a window for each graphical element that you want to include facilitates using boxes, lines, and shading, since the graphical element and the window have the same dimensions and positioning. Example: If a window is defined with the dimensions 6 CM high and 8 CM wide, then this statement in the text element of the window paints a 10 halftone with the same dimensions. The shading is oriented on the upper left corner of the window. /: BOX INTENSITY 10 · Use the POSITION command to adjust the position of a box or line relative to a window. For example, these commands in a form window would allow more room above the first line of text in the window. The box would start 0.2 CM above the top of the window. /: POSITION YORIGIN '-0.2' CM /: SIZE HEIGHT '+0.2' CM /: BOX INTENSITY 5 Make sure to increase the size of the box to accommodate an offset. Otherwise, the box will not cover all of the window. In the example above, the SIZE command increases the height of the box by 0.2 CM to accommodate the positioning of the box above the window. · Draw a horizontal line by setting the HEIGHT in a BOX command to 0. Draw a vertical line by setting WIDTH to 0. /: BOX FRAME 10 TW WIDTH 0 TW HEIGHT '10' CM Vertical line 10 CM long /: BOX FRAME 10 TW WIDTH '10' CM HEIGHT 0 TW Horizontal line 10 CM long · Adjust the tabs in a window to match the position of lines and boxes. Previous Page|Next Page |