| Search Locate Previous Next | Contents |
Objects and properties in the Designer
When you start the Designer with a new variable, it automatically adds one frame (centred horizontally and vertically on the paper) and a page number at the foot of the page. Here is what you will see if you type:
plDesign 'pg1'
The paper is shown with a lightly-ruled grid. As objects are added to the page, they are drawn as frames or lines with handles at the upper left and lower right corners. Here you can see the default frame (with 1 margins all round) and the page number (represented as &p) ½ from the foot of the paper. The grid/rulers are always marked in inches and halves.
Beside the main paper window you will see the Property Watcher which displays the detailed information about the object you most recently clicked on. In this case, it is showing the information related to the paper itself click anywhere on the body frame and you will see it change to look like:
The titlebar shows the name of your layout variable, and the object type in view. Then you have a text field where you can change the caption or id of any object. If you type something here, you will see the changes reflect immediately into the page window.
You will also notice that the caption field is always given focus as soon as you click on an object in the page window this allows you to enter fixed text quickly and easily.
The position and size fields show the location in points of the object, measured from the lower left of the paper. Note that for text, the numbers measure to the baseline of the characters. You may be puzzled by the negative numbers here they relate to the attach property which is explained in the next section.
Using the Attach Buttons
Below the position/size fields is a bank of six toggling buttons which control how the object is attached to the edges of the paper. Think of them as suckers which fix the corresponding edge to that edge of the paper! In this example, a frame is attached both to height and to width, so that it will maintain its margins whatever you do to the paper size or orientation. When you add a new object, it always attaches to the left edge and the bottom of the paper you change this simply by clicking the appropriate button, but watch carefully what happens to the numbers in the pos/size fields as you do this! Experiment with the body frame to see the effect.
What you will see is that positive positions measure the distance from the left (bottom) of the paper to the left (bottom) of the object; negative positions measure from the right (top) to the right (top) edge of the object. You can type negative numbers directly in to the fields if you prefer as soon as you <Enter> or quit the field you will see the appropriate button go down to reflect your change. This gives you an easy way of placing some text 1 from the top right of the page just set the position to (-72 -72).
The size fields behave in a similar way, only here negatives give the total remaining space (the sum of the margins) left+right (bottom+top) around the object. A centred frame will always show exactly double (minus) the value in the position fields here. Here is another example:
This is the page-number text, which is attached to the width of the paper (this also has the effect of centring the text in the object) but has a fixed distance of 32 points from the bottom.
If you want to know more about this, or any other component, press the ? button which will bring up a summary of the help information held as part of the components class definition.
Any other properties which the object may have are listed in the body of the form here you can modify the colour and font (pull-down choices) and type in the size in points. Note that this (and any other number fields) have spin behaviour so that you can simply tab to the field and use the up/down arrows to modify the value.