Your Layout Tools - File Maker

The tools you’ll use when creating and formatting layout objects are located in two places, on the status area in Layout mode and as a toolbar. Number 1 in the illustration shows the tool panel, which contains tools for creating text blocks, lines, rectangles, rounded rectangles and ovals, buttons, and portals. Below the tool panel is the field tool (#2), used to create field objects. Below that is the part tool (#3). The object effects palettes (#4) let you specify fills, patterns, line effects, and special effects for an object or objects.

For each object you’ll learn what the object is and how to create it; then you’ll use applicable styles or effects that may be applied to the object.

Text Blocks
Text blocks are blocks of text that you type onto a layout. They can include any characters available from the keyboard. Text blocks are usually used as field labels (some field labels are called out on Figure above), report headers, or to give instructions or explanations to a user. Also, non-graphical buttons usually have a text block on them to tell users what the button does when pressed.

Text blocks can also include merge fields, which are a way of putting field data into text on a layout. You probably have used merge fields before on form letters. For instance, if in Layout mode, you typed, “This is the record for <<CompanyName>>” on a layout in Company.fp5, you would see, “This is the record for ACME, Inc.” on ACME’s record in Browse or Preview mode. Merge fields are a great way to include field data in a block of text such as the body of a letter or on an address label where you want the text to shrink, expand, and flow depending on the contents of the fields merged into the text block. For instance, on a mailing label, if the Address2 field was part of the text block and, for a particular record, there was no Address2 data, the city/state information would appear snug up against the Address1 data.

Text fields can also be used to place other information on a layout, such as a page number or a print date for reports. You can insert these items via the Insert menu or type them directly into a text block. Here is a list of those items, preceded by the symbolic code you would type into the text block:

## The page number
// Today’s Date
:: The current time
|| The current user name, as specified in Application Preferences
@@ The current record number, based upon the order of the current found set of records

NOTE If you do use any of these symbols in a text block, FileMaker will always substitute the information with the symbol regardless of the context. For instance, a text block containing the text “:::Click Here to Add a Contact:::” would look like “10:10:10 PM:Click Here to Add a Contact: 10:10:10 PM”. FileMaker seems to understand not to substitute “//” in a Web URL.

Adding a Text Block
To add a text block to a layout, click the text tool (indicated by a capital A on the tool palette) and single-click the layout where you want to start entering text. When you’re done typing, click off the text block or leave Layout mode. To edit the text you’ve typed, double-click the text block again (or single-click if the text tool is locked).

Adding a Merge Field to a Text Block
To add a merge field to a text block, select Merge Field from the Insert menu when your cursor is positioned in the text block where you want the merge field. A dialog will ask you which field you would like to insert.

You can add related merge fields as well. Simply double-click the field you want to add and the code for that field will be added to your text block. Be careful not to modify the information between the << and >> of a merge field or the field data will not merge into the text block properly. And don’t worry, if you change the name of a field in Define Fields, FileMaker will automatically rename the merge fields in all text blocks, though it could reflow the text block if the field name change is substantially longer or shorter than it was previously.

Many times you’ll want to use a merge field on a button. For instance, there might be a button on an invoice detail screen that you want to read “Print” until the invoice has been printed once, then read “Print Again” once it’s been printed. The field that is calculating what the button should say could be called cPrintButton.

A few problems can occur in this scenario, though. For one, the name of the merge field might be longer than width of the button (this is especially troublesome in a portal row).

This can be solved by not using the button’s built-in text area, but instead arranging a text block with the calculated merge field in it over the button, centered with center-aligned text. However, depending on where the button is on the layout, this may or may not work.

For example, if the button is flush with the left edge of a layout, you may not be able to center the text block over the button because the text block can’t float past the left edge of the layout. You might try changing the font size of every character of the merge field text except for the leftmost character by two points, so that it looks something like this: “<<cPrintButton>>”. In Browse mode, all of the merge field text will be the size of that first character. The following illustration shows the problem and solution. (This database is also on the CD-ROM so you can see what it looks like in Browse mode as well.)

Layout Tools

Styles and Object Effects
You can apply a full range of styles and effects to the text in text blocks. Highlight some text within a text block (or highlight an entire text block with the pointer tool) and apply using the Style menu or the Text Formatting toolbar or by right- clicking /CONTROL - clicking the text block font, point size, style, alignment, line spacing, or text color to the text. The Text menu under the Format menu brings up a dialog where you can apply many styles to a text block at the same time and preview your selection before committing it to the layout.

If a text block contains a date, time, or number (symbolic code or merge field), you can format how these data types look in Browse mode and Preview mode, respectively, under the Format menu. (You will learn these formatting options shortly when learning about field objects.)

In addition to applying styles to the text itself, you can apply overall styles to the text block using the object effects palette. If you want to change the fill color or pattern, the special effect (embossed, engraved, or drop shadow) or the pen (outline) color, pattern, or point size, select the text block and make your selections on the object effects palette. Usually, field label text objects have a transparent fill and no pen color.

The embossed special effect, when used sparingly, is useful when you want a layout object (usually a button) to appear to rise above the layout. The engraved effect gives the appearance of a depressed button or something sunken into the layout (like a field that can be entered). The drop shadow makes an object appear to float above the layout, which is what a user is used to seeing for dialog boxes. The effectiveness of these effects depends on your color choices and the point size and color of an object’s outline.

The shadow text style isn’t very attractive when applied to most fonts. However, for a similar but more stylish effect, place two text blocks, the one on top with light colored text, and the one underneath with darker text. Offset the bottom text block by a few pixels to the left and bottom of the top text block. Voila! A sharp looking shadow effect!

Font Choice
Use italics and serif fonts such as Times carefully, because they do not render well on screen except at large sizes. Italics depend upon slanted lines that appear jagged even on newer anti-aliased screen rendering; the serifs on a font like Times or Palatino can make small point sizes hard to read.

Simple and readable fonts work best in screen layouts. Use sans serif fonts such as Verdana, which is available cross-platform. Helvetica, which is the default font in FileMaker, a very readable font for reports, was not designed for computer screens.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

File Maker Topics