OK. It's time to dive into Layout mode and see what it's all about. You'll probably spend most of your time in Browse, Find, and Preview modes, but despite this fact, Layout mode has more options, more buttons, more menu commands, and more hidden features than any other mode. As you explore Layout mode in this section, you'll work with the People database you created in the last chapter, so to start things off, open that database and switch to Layout mode:
The database appears on the screen, in Browse mode. If you don't have the People database, you can download a copy from the "Missing CD" page (Section 3.4.5).
Whoa! Welcome to Layout mode…and you thought you had this FileMaker stuff figured out. (Figure 4-8 shows what you should see on your screen.)
4.4.1. The Status Area
You don't have to look too closely to see that the status area has changed significantly (Figure 4-9):
Note: It isn't just the status area that changes, though. Take a look at the menus. The Insert and Format menus, which are almost always gray in Browse mode, are fully functional now. And you have two new menus to help you design: Layout and Arrange. Note: You may need to make your window taller to see everything the status area has to offer in Layout mode. In Windows, drag the top edge of the window up, or the bottom edge of the window down. In Mac OS X, drag the resize box at the bottom-right corner of the window.
4.4.2. View Options
Although Figure 4-9 shows how your database normally looks in Layout mode, FileMaker offers a host of options to change it. Each of these options has absolutely no effect on the finished look of your layout in Browse mode; rather, they help you while you're designing the layout. The View menu keeps those old standby commands (Browse Mode, Find Mode, Layout Mode, Preview Mode, and Go to Layout) right there where they belong. But you get choices that are more suitable for layout tasks.
188.8.131.52. Go to Layout
This hierarchical menu gives you an alternative to using the status area's Layout pop-up menu to move to all your layouts. In Browse mode, the Go to Layout submenu shows only those layouts that you've specified for inclusion in Layout menus. But in Layout mode, all layouts are listed, so you can switch quickly as you work.
184.108.40.206. Page margins
If you want a better feel for how your layout will look when printed, choose View images/U2192.jpg border=0> Page Margins (Figure 4-10). FileMaker shows a light gray border around your layout, representing your current page margins.
Note: Remember that the parts all show in Layout mode, but in Browse mode or when printing, parts come and go. So even when you display page margins in Layout mode, the height of the layout doesn't directly translate to the height of the printed page.
220.127.116.11. Graphic rulers
Choose View Graphic Rulers to get a handle on the actual size of the layout and the objects on it. When theyre turned on, you see a ruler running up the left edge of the layout, and another across the top (see Figure 4-10). You can use this ruler to measure how big layout objects are and align things perfectly to a spot on the printed page, since an inch, centimeter, or pixels on the ruler matches the same unit when printed. Change the rulers' unit of measurement by clicking the square where they intersect. Units cycle through a series of presets: inch, centimeters, and pixels.
18.104.22.168. Text ruler
You might not care how tall your page is, but you do want to know how wide objects are. If so, choose View Text Ruler. When you have no text objects selected on a layout, the text ruler looks just like the graphic rulers above, except theres no ruler along the left margin. You see text ruler in action when you have a text object selected. Then the ruler shrinks to the width of your object, and displays margins, indents, and tabsan ideal tool for judging space when your trying to cram a lot of information onto a small screen.
|POWER USERS' CLINIC
Configuring Graphic Rulers and Lines
You don't have to be content with the lines and rulers File-Maker gives you. If your rulers are in inches, for example, and you prefer to work in pixels, you can easily make the change. When in Layout mode, simply choose Layouts Set Rulers. In this window, you can choose the units your ruler uses. If you choose Inches, FileMaker draws ruler lines one inch apart. If you choose Centimeters, your lines are one centimeter apart instead. When you set your ruler units to Pixels, the lines are 100 pixels apart (a line every pixel would probably be counter-productive).
This dialog box also has a setting for grid spacing. See the box "Exercise Some Constraint" on Section 22.214.171.124 for an explanation.
126.96.36.199. Ruler lines
Rulers running along the edge of the window may not provide enough visual alignment aid to suit your tastes. In that case, choose View images/U2192.jpg border=0> Ruler Lines. FileMaker draws dotted lines along your layout in a grid pattern. With this grid, you can more easily see how things line up on the layout, and get objects just where you want them on the printed page.
Choose View T-Squares to show the T-Squares (Figure 4-11). When FileMaker shows you the T-squares, they always land aligned smack-dab in the middle of your layout. To move them where You can even use the T-Squares to line up objects on more than one layout. Align something to the T-Squares, and then switch to a different layout and align another object to them. Now, as you switch between these layouts, the two objects stay in the same place. So what, you say? Most often, the two objects are really two copies of the same thing, say a button you want in the same place on two different layouts. If these two objects aren't precisely aligned on each layout, you'll see a very distracting flash when you switch between those two layouts. Sure it takes a little time, but this kind of precision will give your database polish and a professional look.
188.8.131.52. Object size
This tiny window is a powerhouse of formatting options. See the box on Section 184.108.40.206 for power users' secrets.
Contrary to what you might think, View Show images/U2192.jpg border=0> Buttons doesnt show or hide your buttons. Instead, this command puts a thick gray line around all objects you've defined as buttons. You haven't learned about buttons yet, so see Section 220.127.116.11 for directions on how to make objects bend to your will and turn into buttons.
18.104.22.168. Sample data
As mentioned above, FileMaker normally shows the name of each field inside the field itself. If you yearn for something less useful (alright, differently useful), you can choose View Show images/U2192.jpg border=0> Sample Data. FileMaker shows semi-random sample data in each field. Actually, this feature does have some limited value: It shows numbers in your number field, dates in your date fields, and so on. This feature can give you a visual clue about how these values are being formatted (youll learn how to format data in fields shortly). Figure 4-10 also shows fields with sample data.
22.214.171.124. Text boundaries
Normally, text objects on a layout (like the field labels you see now) have no border around them. Sometimes, though, you can have a tough time visually lining text up since different letters have different shapes and sizes. If you choose View images/U2192.jpg border=0> Show images/U2192.jpg border=0> Text Boundaries, you see a tidy box surrounding each text object. When you line up these boxes, you ensure that the text inside them is lined up too.
Note: In case it isn't obvious, you can turn any of the above options off by choosing the appropriate command a second time.
126.96.36.199. Field boundaries
All the view options available in layout mode are turned off unless you turn them on yourselfexcept for this one. FileMaker normally shows a border around every field no matter how you have that field formatted. If you don't want to see this border, choose View images/U2192.jpg border=0> Show images/U2192.jpg border=0> Field Boundaries. Figure 4-10 shows how the layout looks with field boundaries turned off.
Note: Don't confuse field boundaries with text boundaries. Field boundaries show around field objects (of any type) while text boundaries show around text objects.
188.8.131.52. Sliding objects
This command places small, black arrows near the top of any item that's been set to slide during printing. See Section 184.108.40.206 to learn how to make objects slide.
220.127.116.11. Non-printing objects
This command puts square black handles at the corners of any object that's set as non-printing. See Section 6.5 to learn how to make objects non-printing.
You can find all FileMaker's toolbar commands in either the menus or on the status bar. But if the fascination of menus has lost its steely grip on you, you can show or hide any of FileMaker's toolbars at will. They come in four flavors:
Tip: If the icons on these buttons don't immediately convey meaning to you, let your mouse pointer hover over each one. After a second or two, the button's name appears in a yellow field, called a tooltip. (If you have FileMaker Advanced, you can create tooltips of your own, as explained in Chapter 19.)
The first time you see these toolbars, they're anchored near the top of the screen, just under the menu bar. But they all have dotted gray lines at their left edges. Just use these lines to drag the toolbars wherever you want them. They are powerless to resist you and will stay where they're put. Use the close box to make them go away.
18.104.22.168. Status area
This is a menu-based choice for showing and hiding the status area. If you have to work on a laptop, or any other computer with a small screen, you'll be grateful for the extra pixels you can squeeze out by hiding the status area while you're designing your layouts.
22.214.171.124. Zoom in and out
The View menu also has options to zoom the layout in or out (View Zoom In and View images/U2192.jpg border=0> Zoom Out). If the thrill of clicking the zoom controls in the status area isnt enough for you, can alternate between zoom buttons below and zoom menus above. You do have some control over what area of the screen is magnified. If there's an object you need to see, select it before zooming in. FileMaker tries to keep that object centered as it zooms.
4.4.3. Layout Setup
Most of your layout work simply involves creating and adjusting layout parts, and filling them with things. But some important aspects of a layout aren't visible on the layout itself. These settings are tucked away in the Layout Setup dialog box (Figure 4-12) instead. You can call this window into action by choosing Layouts images/U2192.jpg border=0> Layout Setup.
With the People database open, switch to Layout mode. Now's a good time to set some options.
126.96.36.199. Layout name
First up, suppose your People database holds all your clients. You might want to change the name of this layout to "Personal Details." This change clears the way for a "People List" layout down the road.
In the Layout Name box, type Personal Details.
You can give a layout just about any name you want, so long as it's no more than 100 characters long. You can even have more than one layout with the same name, if you're a fan of confusion. FileMaker keeps track of layouts using an internal ID number, so it always knows which layout is which. But you have to depend on the names you give your layouts, so name them wisely.
Normally, each layout is listed in the Layouts pop-up menu, so that when you're using the database you can switch to that layout at any moment. In this case, you want to be able to check out client details at an instant's notice.
Sometimes, you'll turn this checkbox off when a layout serves a special purpose: Perhaps it's a report that makes sense only after performing a special find and sort; or a search screen that works only in Find mode. In cases like these, you can turn off the "Include in layouts menu" checkbox and use a script (Part 5) to go to the layout instead. When you do, the layout no longer shows up in the Layouts pop-up menu or the View Go to Layout menu in Browse, Preview, or Find modes.
Turn off the "Save record changes automatically" checkbox.
This way, FileMaker displays the message shown in Figure 4-13 whenever you try to exit a record after making edits to it using this layout. It's confirming that you want to save those changes when you commit the record.
If you leave this checkbox turned on, this saving happens quietly in the background. FileMaker's factory setting is to commit changes the moment you leave the record, as you learned on Section 1.5.3. In this case, however, as your business grows, you're planning to hire a helper to edit and update client information. Until that person gets up to speed in FileMaker, you want to give him a chance to double-check his work.
The "Show field frames when record is active" option affects how FileMaker shows fields in Browse and Find mode. You've probably noticed that whenever you're in a field, every field on the layout has a dotted-line border around it. These borders help people figure out where the enterable fields are. Figure 4-14 illustrates the difference.
Using the tools in this chapter, you, O savvy database developer, can make your layout clear and user-friendly without the unsightly dotted lines, so turn them off.
You can always return to this dialog box (Layout images/U2192.jpg border=0> Layout Setup) if you ever get confused and want to use the dotted fields as a guide.
Note: The Menu Set pop-up menu gives you heretofore unheard-of power. Using FileMaker Advanced, you can control which menus and commands are available when your users view a layout. But you won't learn how to do that until Chapter 19, so don't touch that dial just yet.
Now, if you switch to Browse mode, you see the new name in the Layout pop-up menu, and no frames when you click a field. Of course, without the field frames, your invisible fields look a little odd. You'll fix this problem shortly. But first, you need to learn about the tools you have in Layout mode.
4.4.4. Layout Tools
The vast majority of new goodies in the status area are toolslike their real-world counterparts, you use tools to build thingsin this case, your layout. You can see all the tools in Figure 4-15.
188.8.131.52. The drawing tools
The first set of tools in the status area is the drawing tools. These tools, for the most part, just let you draw decorations on the layout. They're the top two rows of the main tools panel, and you see them up close in Figure 4-16.
Note: If you Find FileMaker's drawing tools limited, fear not. You can create icons, buttons, or any other elements in any drawing program, and then place these images on your layout. Find out how on Section 184.108.40.206.
220.127.116.11. The control tools
The drawing tools let you gussy up your layout. But the control tools let the layout get down to business. With this fantastic four, you tell the layout where to put data and where it should go looking for that data. You can also create buttons to automate tedious or lengthy processes, and you can create tab controls, which make designing complex databases a breeze.
18.104.22.168. The field and part tools
The next tools in line are the Field and Part tools, which simply let you add fields and parts to your layout. To create a new field, drag the Field tool onto your layout. When you let go of the mouse, FileMaker draws the field and pops up the "Specify Field" dialog box. Click the "Create label" option if you need a field label. Click OK and your field is created.
22.214.171.124. The line and fill Tools
Next up are the fill and line attribute tools, shown more closely in Figure 4-18. When you click these buttons, you get menus from which to pick colors, patterns, line thicknesses, and other special effects, each of which you can apply to assorted objects on the layout. For example, when you have a shape selected, you can choose from the menu under the fill color tool and change the shape's color. You'll use these tools all throughout this chapter.
Fill color, pattern, and effect. When you select an object on the layout, the fill color changes the color of the object itself. You can also apply a repeating pattern to the object for that oh-so-80s look. If the early 90s is more your style, the Fill Effects tool lets you apply a simple drop shadow, an embossed effect, or an engraved effect. Figure 4-19 shows some rectangles with various fills.
Line color, pattern, and weight. The next three tools affect the outline of an object, rather than its fill. You can again control color and pattern. The Line Weight tool also lets you adjust the thickness of the outline itself. You can see some line settings in action in Figure 4-20.
4.4.5. Working with Parts
The first step to any layout design is to put the parts where they belong (or at least approximately where they belong; you can always tweak them later). In the beginning of this chapter you learned about the kinds of parts a layout can have, and it's your job to decide which ones you want for the layout you're building.
In your People database, your first job is simpleto pretty up the layout FileMaker created for you. It makes sense that such a layout would have a header part (where you can announce the layout's title) and a body (where you can put the actual fields). Figure 4-21 shows one person's idea of a nicer looking detail layout.
126.96.36.199. Deleting a part
The quickest way to delete the footer part (which you don't need for this particular layout) is to click its part label and press Delete. (The part label is the little gray tag that says Footer.) Go ahead and delete the footer part now. Since this footer is completely empty, it simply goes away immediately. If a part has any objects in it at all, FileMaker asks you if you're sure before removing the part and everything in it.
188.8.131.52. Resizing parts
Your next job is to make the header a little larger. Just drag the part label straight down a bit. As you drag, a dotted line tells you where the part will land when you let go. For now, make it about double its original size.
Every part below the one you resize moves down to make room, which is almost always what you want. But suppose your overall layout size is just where you want it (perhaps it's designed to print on a special form, and the exact size is critical). In a case like this, if you want to resize the header, you probably don't want it to push other parts down. Instead, as the header grows, you want the body to shrink a little, so that the header eats into the body. To get this effect, hold down the Alt (Windows) or Option (Mac) key while you drag the part label. When you do, the border between parts changes, but the overall layout size remains the same, and the objects on the layout don't move at all.
Note: Unless you hold the Alt (Windows) or Option (Mac) key when making a part smaller, you can't drag the part boundary above the bottom-most object it contains. To get around this glitch, you must move the objects out of the way, delete the objects, or hold down the necessary keys while you drag.
FileMaker won't let you put objects outside a part, so sometimes as you're arranging things you get cramped for space. To make the rest of your layout work easier, go ahead and make the body part taller as wellyou can shrink it back down later.
184.108.40.206. Coloring a part
The finished details layout should have a shaded header (Figure 4-21). Getting this effect is a breeze:
The label itself darkens to let you know it is selected.
A menu of available colors pops up.
The header part changes to match the selected color.
Note: You can apply a pattern to a part as well, but parts can't have fill effects.
Repeat the steps above, this time selecting the body part and a different color (like light gray). When you color a part, this color becomes the background color both in the database window and when you print. With this phenomenon in mind, you should probably avoid excessively dark or otherwise awful colors and patterns.
4.4.6. Adding and Editing Text
Figure 4-22 shows how your layout probably looks right now, and how it's going to look when you're done. Your next assignment is to put the text in the header. FileMaker's text tool makes it a cinch to click anywhere in a layout part and type away.
220.127.116.11. Adding new text
The first piece of text in the header should say "People I Know." This is a title for your entire database (in other words, your list layout will say the same thing on top). Here's how to do it:
The Text tool button darkens to let you know it's active.
Choose Format Size images/U2192.jpg border=0> 18 Point.
Choose Format Style images/U2192.jpg border=0> Bold.And finally, you want this title to be bold.
A new text box appears (Figure 4-23). This text box is FileMaker's way of saying "Go ahead and type."
As you type, the words appear in the box.
The dotted outline and flashing insertion point disappear and you're left with a full-fledged text object. This object is automatically selected for you.
You move a text object like any other object: Just drag it.
|POWER USERS' CLINIC
Locking the Layout Tools
After you create a text object with the text tool, the selection tool is automatically activated. FileMaker assumes you want just one text object, and saves you the trouble of switching back to the selection tool. If you anticipate creating several objects of the same type, give the tool icon a double-click instead of a single click. The icon on the button turns white to let you know the tool is now locked. With a locked text tool, you can create as many text objects as you want: Click to create the text box, type the text, click again for another text box, and so forth. When you're finished, click the selection tool again to make it active.
If, for some reason, you don't like FileMaker always switching back to the selection tool on your behalf, you can instruct it to lock the drawing tools automaticallyso even a single-click keeps a tool active until you say otherwise. In Windows, choose Edit Preferences. In Mac OS X, choose FileMaker Pro images/U2192.jpg border=0> Preferences. In the preferences window, select the layout tab (shown here) and turn on the "Always lock layout tools checkbox. If you're like most people, you want to switch this checkbox off after trying it for about ten seconds; just revisit the Layout tab of the preferences window and turn this checkbox off.
As well as the main title, a header often also includes something to remind you (and the people who use your database) what layout you're looking atthe "[Detail]" text in this case. You already know how to do it:
A new text box appears, ready for typing.
The text box reflects your typing, but the text isn't the right size or style.
Again, the signs of an editable text box disappear and FileMaker selects the new text object.
Enter 11 in the "Custom font size" box, and then click OK.
The text you just created immediately changes size.Note: Since 11 Point isn't normally in the Format Size menu, you have to use the Custom size option instead. This option works the same in layout mode as it does in Browse mode (see Section 2.5.1).
You can see it coming: Just drag.
|UP TO SPEED
Find and Replace Revisited
Layout mode retains some features you've already learned from Browse modealbeit slightly modified to make sense to a database designer rather than a database user. For example, you might want to find and replace text on a layout, on occasion. Imagine you have decided to call the Zip Code field Postal Code instead, since you're planning a big drive into Canada. You can use Find/Replace to fix every field label on every layout in just one shot. When you're in layout mode, the Find/Replace command searches through text on the layout itself rather than search through the data in fields and records.
Here's the pared-down dialog box you see when you choose Edit Find/Replace images/U2192.jpg border=0> Find/Replace in layout mode. Aside from a the lack of "Search across and "Search within" options which make no sense when you're not searching records and fieldsit looks and works just like its Browse mode counter part.
The other commands on the Edit Find/Replace submenuFind Again, Replace and Find Again, and Find Selectedalso work exactly as they do in Browse mode. (See Section 2.5.1 for details on the ins and outs of Find/Replace.)
18.104.22.168. Changing text font, size, and style
FileMaker created a handful of text objects for you when it made this layoutthe field labels. You can change the font and style of each label to make them attractive and easy to read, and you can also adjust the size to make sure everything fits. Figure 4-22 shows 11-point Verdanaa simple style that looks tidy and readable on most monitors.
Tip: If you're designing a database on the Mac for use on PCs, you'll need to make all your text objects just a little larger than you think they need to be, because PCs display fonts larger than their Mac brethren do. It helps to check your layouts on a PC, because any text object that isn't wide enough will flow over onto another line, which probably isn't what you intended.
You've probably already figured out that to change something about an object, you first need to select it. You can select the first object, change its font, change its size, change its style; then select the second object and repeat…over and over until you're done or until you've torn out your last remaining hair. Or you can select all the field labels and change them in one shot. The box on Section 22.214.171.124 describes several ways of selecting multiple layout objects, but the quickest way is often to rubber band them. That is, you drag to encompass the objects with your mouse. Here's how:
This spot is where you'll start your rubber band. Notice that as you drag around, a dotted rectangle follows youthat's the rubber band.
Every object you want to select must be inside the rubber bandit can't hang out the edgeso be sure you go far enough to the left. You can see a picture of a rubber band in action on the next page.
You should see all the field labels selected. This process is easier to do than to explain, so the best way to learn how is to try it.Note: To be sure you got what you want, make sure every field label has its own selection handles. If you missed one, just hold down the Shift key and click itthis action adds it to your current selection. Now that you have all the labels selected, you can start formatting them en masse.
Choose Format Size images/U2192.jpg border=0> 11 Point.
Note: Since the last custom size you used was 11 Point (when adding the "[Detail]" text on Section 126.96.36.199), FileMaker now lists it at the bottom of the Format Size menu. (If it isnt there, shame on you for not following directions! Only kidding.) Choose Format Size images/U2192.jpg border=0> Custom instead.
|POWER USERS' CLINIC
Selecting Lots of Objects
Selecting objects on a layout is such a common task that FileMaker gives you several ways to do it. You can always click an object to select it, but you can use any of the following methods as well:
If you want to select more than one object (so you can operate on them all at once), select the first object, and then press the Shift key and click each additional object. As you click, each object joins the selection. If you accidentally select an object, Shift-click it again to deselect it.
To select everything on the layout, choose Edit .Select All or press Control-A (Windows) or -A (Mac).
You can even select every object of a certain type (every field, for example). First select one object of the type you want. Then hold down the Shift (Windows) or Option (Mac) key and choose Edit Select All. FileMaker selects every object that is similar to the one you selected yourself.
and every text object, select one field and one text object, and then choose this command.
Finally, you can easily select objects that are close together on the layout by rubber banding them, (see the figure below). Rubber banding takes a little practice, but the idea is simple: Click and hold any empty spot on the layout, and then drag diagonally. As you drag, a dotted rectangle follows the mouse. When you let go, any object completely inside this box is selected. If surrounding every object is too difficult, hold down the Control key (Windows) or the key (Mac) and FileMaker will instead select any object the box touches.
See the box "Locking and Grouping below for a few more commands that help when you work with lots of objects.
The labels were already bold, so you don't need to change the style. Now you have labels that look right, but their positions are all out of whack. That's OK, though, 'cause you're about to move them all anywayafter one more text editing maneuver.
|UP TO SPEED
Text Format Dialog Box Revisited
If you've read Chapter 2, you know that you can choose Format Text to summon the Format Text dialog box, a one-stop shop for all your text formatting needs. This handy window is fully accessible in layout mode as well (the Text command is just a little lower down in the Format menu). From here, you can adjust the font, size, and style in one shot if you prefer. You can also change text color and paragraph settings, both of which work just as well for text objects in layout mode as they do for field data in Browse mode.
188.8.131.52. Editing existing text
If you compare the field labels you have now to those in Figure 4-22, you'll see you have a little more editing to do. The final layout has these field label changes:
Now you need to make these changes to your field labels.
First, get rid of the City, State, and Zip labels. Zapping them is a breeze: Select them all (using any of the methods described on the previous pages) and choose Edit Clear or press the Delete or Backspace key. (If youre good with the mouse, you can use the rubber-band trick [Section 184.108.40.206] to select them all, but it's probably just as easy to Shift-click each one.)
Now edit the remaining labels. Start with the Phone Number field:
Your mouse pointer now has the typical text-editing I-beam shape. As an added bonus, the text tool is locked so you won't have to pick it again to fix the next field label.
The text object turns back into an editable text box, with dotted outline and all.
The first Delete removes the word Number. The second wipes away the blank space after Phone.Note: When you're editing a text object like this, you're free to use the mouse or arrow keys to move about the object. It works just like entering text in a field in Browse mode. You can even apply fonts, sizes, and styles to individual letters or words inside a text object. For example, you could make the "e" in Phone bold (if you really wanted to).
The label is now selected, and it says Phone, just like it's supposed to.
Three more labels need fixing: Street Address, Email Address, and Goodness Rating. Repeat steps two through four above to make the necessary edits. (Don't forget that you're just changing the field label here, not the actual field name [as you did back on Section 3.2.1]. You can confirm this by looking inside the field in layout mode, or making a quick trip to the Define Database window. You can even give the same field different labels on different layouts.)Note: By almost every measure, a field label is just like any other text object. But the labels FileMaker creates for you have one hidden property that makes them special: When you change a field's name in the Define Database window, its label automatically changes to match. As soon as you edit the text in a field label, though, this magical bond is broken. This break may be a good thing or a bad thing depending on your point of view. Some people edit their field labels manually so they can pick just the right name given the available space and the nature of the layout. Other people find that keeping their field labels and field names in sync helps them keep things straight in their heads. Thou mayest choose for thyself.
Figure 4-24 gives a quick sanity check. Your layout should look something like this.
|POWER USERS' CLINIC
Locking and Grouping
Sometimes an object just keeps getting in the way when you try to work with another one. For example, you might paste a large picture as the background of your layout. Every time you try to rubber band some objects, you end up moving this picture instead, since it fills all the otherwise empty space. To put this problem to rest once and for all, just lock the offending object. First, select the object or objects you want to lock. Then choose Arrange Lock. Now you cant move, resize, or otherwise edit the object. If you need to do any of these things to it, just click it once and choose Arrange Unlock to bring it back to normal.
Group) to make them act as one. Once grouped, anything you do to one of them happens to them all. If you move one, they all follow. If you delete one, they all go away. And if you change any attributeslike font sizeall of them change. The only thing you can do to an individual item that is part of a group is edit its textthe text tool can cut right through the group and let you edit an individual object. When youre ready to treat them as separate objects again, just select the group and choose Arrange images/U2192.jpg border=0> Ungroup.
4.4.7. Formatting Fields
Before you get to arranging the fields on the layout, you need to make one more adjustment. In the previous section, you formatted the labelsthe text that identifies your fields onscreen at all times. FileMaker also lets you control how text appears when someone types into those fields later.
220.127.116.11. Text formats
Formatting text fields works just like formatting field labels. The trick is to select the actual fields first. You can also give fields borders for emphasis or decoration. Here's how to give your fields the look shown in Figure 4-22:
Hold down the Shift key and click the Goodness Rating field.
This field needs special formatting, and you'll get to that later in this chapter, so you don't want to change it now. When you Shift-click an already selected object, you remove it from the selection.
Now that you have the fields selected, your first job is to adjust the text formattingthe way text will look when someone types in Browse mode. You've done this with text objects already (Section 2.5.4), and there's no difference here. Use the Format images/U2192.jpg border=0> Text command to bring up the Text Format dialog box, where you can choose 11-Point Verdana.
18.104.22.168. Other field type formats
If you've worked with numbers in other programs, like other databases or a spreadsheet program, you know that number formatting can save lots of keystrokes and help you organize numbers so they're more legible. Likewise, entering in Date, Time, and Timestamp fields can have their challenges when you're trying to get the data to look a certain way. See Section 22.214.171.124 for details on formatting these alternate field types.
4.4.8. Field Control
You can get information into a database without typing. You can attach value lists to fields and format them as checkboxes, radio buttons, or menus for making data entry fast and accurate. And you can tell the field how decorative it ought to be by defining borders for it.
126.96.36.199. Field/Control setup
Up to now, you've been learning about formatting the text, or the stuff that's in a field. But now, you'll see that the field itself can be formatted with styles that have nothing to do with text. When FileMaker threw those first fields you defined out on the layout for you, it just made plain old fields, called Edit Boxes. But with this dialog box, you're in control of how the field accepts information.
Control style. Take control with the Format Field/Control images/U2192.jpg border=0> Setup command, and you can see it here in Figure 4-25. To see how it all works, youre going to turn your Goodness Rating field into a pop-up menu field and assign it a value list.
(And if you're wondering what all this talk of pop-up menus has to do with formatting, see the box on Section 188.8.131.52 for an explanation.)
In the People database you've been working on so far, the Goodness Rating field works just like any other: You can type any number you want into it. But you've already decided it should only take whole numbers between zero and five. You want to prevent anyone (even if that's you) from messing up your database by accidentally (or nefariously) adding a bogus numberlike 21.785 or 4E27.
The perfect solution is to make the Goodness Rating field a pop-up menu showing the choices 05. That way, anyone using the database can immediately see what the expected options are and choose one with a swift flick of the mouse. By providing only acceptable choices, a pop-up menu ensures that the right kind of information ends up in the fieldand makes data entry easier to boot.
It grows selection handles.
Figure 4-25. The Field/Control Setup dialog box (Format Field/Control images/U2192.jpg border=0> Setup) lets you control how a field presents itself on the layout. You can add scroll bars, control the display of repeating fields, andmost useful of allturn ordinary fields into pop-up menus, checkboxes, or radio buttons. All of these advanced options are covered in detail in Chapter 6.
The "Include vertical scroll bar" checkbox disappears and a new pop-up menu takes its place.
The Define Value Lists dialog box swings into view. The details of creating value lists are explained in Chapter 3; flip back to Section 184.108.40.206 if you need a refresher.
The Goodness Rating field now looks like a pop-up menu (a retro-80s pop-up menu, but a pop-up menu nonetheless). In Figure 4-26, you can see how it displays the value list you just created.
Field/Control borders. Next up are the field borders. In layout mode, your fields probably have black borders and baselines (see Figure 4-8), but in Browse mode, they're just floating bits of text. To give them a little more substance, you can put a true border around them, and then give them a nice engraved effect:
The Sample area shows how your field will look with borders applied to all four sides.
The Field Borders dialog box goes away. You probably won't notice any change since FileMaker normally shows a thin border around fields in layout mode, but your fields really do have borders now, even in Browse mode.
|UP TO SPEED
Formatting Different Field Types
Most people think of formatting as something you do to textchange the font, make it boldface, or whatever. That's also true in FileMaker when it comes to formatting text. But when you're talking about formatting fields, you begin by choosing the overall style of field you want in the first place. In FileMaker, that's called the field setup, which is why the Field/Control Setup dialog box includes options like Pop-up Menu and Checkbox Set. There you can apply various options and settings depending on the basic field format.
Chapter 6 goes into great detail about how these different field formats work and how to choose options for them. Here's a brief rundown:
FileMaker draws a beveled edge around each field.
In addition, the notes field needs a scroll bar.
The fields now look a little more like…well…fields. But you've unwittingly created a new problem: The fields are now too short. When you added the engraved effect, FileMaker put an extra border around each field. This extra border uses up one pixel on each side, reducing the vertical space inside the field by two pixels. These few pixels make a differencelook at the City field, for example, whose "y" has lost its tail.
To remedy this problem, you need to make each field a little taller. But how much taller? Luckily, FileMaker knows just how tall a field needs to be, and it's ready to help you out. When you resize a field with the mouse, FileMaker won't let it get smaller than it needs to be to properly show one line of text in the selected font and size. You just need to manually resize the fields, letting FileMaker do its thing. You can see the process in Figure 4-28.
You'll learn lots more about resizing, moving, and aligning objects in the next section.
4.4.9. Laying Out the Layout
You're finally ready to organize the fields on the layout. The goal of a layout is to present information in a clear and attractive mannerin this case, the details for the people in your database. Turn back to Figure 4-22 to remind yourself how this layout is supposed to look.
Right now, though, your window probably shows something of a mess. More like Figure 4-29, perhaps. To organize and beautify your layout, you need to move and resize your fields, and line things up, as described in this section.
220.127.116.11. Resizing objects
Turn on text boundaries (View Show images/U2192.jpg border=0> Text Boundaries) and take a look at the labels you edited a few pages back. You see that some text objects are quite a bit longer than the text they contain. When you delete part of a label, the object itself doesnt get shorter. FileMaker doesn't let objects extend off the edge of a layout, so those long text boxes don't allow room to put the labels as far to the left as you want. You'll need to shorten them.
The first three fields are bigger than they need to be too. You can easily fix them all at once. Select each object (Shift-click or use the rubber band), and then resize one of them using its handles (it doesn't matter which one you resize). When you finish, every selected field changes size to match the one you dragged.Tip: The trick above works great if all the fields start at the same size, but it gets squirrelly if they aren't equal sizes to start with. Use the Arrange Resize to images/U2192.jpg border=0> Smallest Width command to resize fields that start out different sizes, but need to end up the same width. You can also resize fields by height and to the largest size instead of the smallest.
While you're at it, make the Goodness Rating field narrower too. It can be very small since it shows only one digit. Finally, make the notes field nice and tall so it can hold lots of notes.
18.104.22.168. Aligning objects
Most of the field labels on the finished layout are right-aligned against an imaginary line running down the layout, as shown in Figure 4-30. Only the Goodness label doesn't follow this rule, so for starters, move it to the right of the fields so it's out of the way.
|POWER USERS' CLINIC
Dragging or using the Arrange menu aren't the only ways to resize objects. If you're a numbers person, you can use the Object Size palette instead. Use the View Object Size menu command to bring up this tiny window. It shows information about the selected objectnamely, its position (how far the left, right, top, and bottom edges of the object are from the top-left corner of the layout) and its height and width.
When you're done, you can be absolutely certain both fields are the same width. Of course, you can also use this technique to set an object's height. You can even change an object's position and both dimensions in the same trip. If your memory is good, remember all four numbers. If you're middle-aged, write them down, because you'll have forgotten at least one of the numbers by the time you switch to the second layout.
The Object Size palette uses the same units you have your graphics rulers configured to use. But don't waste a trip to the Layout Set Rulers menu just to change it. Instead, you can click the units displayed on the palette. As you click, FileMaker cycles between the supported unit typesInches, Centimeters, and Pixels keep clicking until you find the one you want.
But in your layout as you have it now, the fields labels are all over the place. Your first order of business is to get them all lined up along the right edge: Select all the field labels except the Goodness label. Then choose Arrange images/U2192.jpg border=0> Align images/U2192.jpg border=0> Right Edges. They leap to attention, all with their right edges in line with the text object that had been farthest to the right.Tip: If you have fields that are lined up vertically, but the spacing between them isn't even, use the Arrange Distribute images/U2192.jpg border=0> Vertically command to make the spacing regular. Theres also an Arrange Distribute images/U2192.jpg border=0> Horizontally command to make your life a little bit easier.
22.214.171.124. Moving objects
Now that the field labels are lined up, you can move them to their final resting place. Just select them all and then drag them a little to the left. Hold down the Shift key to make sure they don't drift up or down while you drag. When you Shift-drag objects, FileMaker makes sure they only move in one direction: up and down or left to right.Tip: You have to press the Shift key after you press the mouse button to start dragging. If you don't, File-Maker just sees a Shift-click, and deselects the object. Luckily, you can press the Shift key any time during a drag, and FileMaker will instantly snap the object to a perfect trajectory. You can even release Shift middrag if you decide you don't want constrained movement after all.
Using all the arrangement powers you now possess, it's time to line things up so the fields sit next to their labels. If you're using the Object Grids command (see the box on Section 126.96.36.199) or you have very sharp eyes, you can probably just drag the fields next to their labels and get perfect alignment.Tip: If you're having trouble getting perfect alignment, don't hesitate to turn on the T-Squares (View T-Squares) or use the Arrange images/U2192.jpg border=0> Set Alignment command to ease your way.
|POWER USERS' CLINIC
Exercise Some Constraint
FileMaker developers often resize and move. Bearing this in mind, FileMaker has a few tricks up its sleeve to make things easier. You already learned how to hold down the Shift key to constrain mouse movement. Here are a few more goodies:
As if that weren't enough, you can use the Object Size palette introduced above to move objects as well. If the palette says the left edge of an object is two inches from the ruler origin, you can type 4 instead to move it farther into the layout.
The City, State, and Zip fields don't have labels of their own. Instead, they line up side-by-side under the Street Address field. Make the City field about half the width of the Street Address field. Then place the State field next to it, and make it wide enough to hold two letters. Finally, drop the Zip field in place next to the State field. Chances are you can't align the Zip field perfectly with the right edge of the Street Address field. If necessary, use the T-Squares, the Object Size palette, and the arrow keys to bring things into alignment.
Lastly, put the Goodness label and its associated field in the right spot.
188.8.131.52. Adding images
The finished layout has a cute person icon next to the People I Know text. To add a picture to the layout, you can copy it from any other program, and then paste it directly on the layout. If the picture you want is in a file on your hard drive, use the Insert images/U2192.jpg border=0> Picture command instead. When you do, FileMaker will ask you to pick a picture file, and then insert it on the layout.
Once the picture is added to the layout, drag it into position in the header. If necessary, resize the header to accommodate it, and move the People I Know text object out of the way.
4.4.10. Adding a Dividing Line Between Layout Parts
You may also want to add a line between the header and body parts. As you can see in Figure 4-30, this line helps break up the space in the window, and helps your eye locate the important information in the lower (body) part of the window. If you use a Mac, this line can serve as more than decoration, as discussed in Figure 4-31. (In Chapter 14, you'll learn more about how to deal with the differences between Mac OS X and Windows when working with multiple windows.)
The mouse arrow changes to a crosshair.
As you drag, a dotted line shows you what your line will look like. When you release the mouse button, the line appears.
The Object Grids might prevent you from getting it right on the part boundary.
The dotted part boundary line marks the end of the part above it, so this line is at the bottom of the header, not the top of the body.
As you drag, hold the Shift key while you resize the line to make sure it stays perfectly horizontal. The line now marks the desired width for the layout.
184.108.40.206. Wrapping up
You only have a few last touches to complete your layout. First, add a text object to hold the Goodness Rating key and type into it, 0 = Evil Empire, 5 = Santa Claus.Tip: If you're like most people, your Font menu is half a mile long. It can be a real drag finding and selecting just the font you want. To save the trouble, duplicate one of your field labels and use that for the Goodness Rating key instead (Edit Duplicate). Just edit it to show the correct text, and then change it to 9 Point and remove the bold style. You have an easier time duplicating an existing object than you do making a new one, since the duplicate picks up all the attributes you painstakingly set.
Just for added flair, go ahead and make the Goodness Rating field use a red text color. With the field selected, choose Format images/U2192.jpg border=0> Text Color and pick a red from the color menu.
The Goodness Rating pop-up menu looks nicer if you center its text. Select the field and choose Format images/U2192.jpg border=0> Align Text images/U2192.jpg border=0> Center.
You're ready to switch to Browse mode. When you do, FileMaker asks if you'd like to save your changes. Click Save. Now you see your new layout in action!
Phew! That was a lot of work. Designing a FileMaker layout is a very visual process. That's really good news since it makes the process pretty obvious once you learn the tools. This chapter may make it seem like a lot of work, but making a layout like this will quickly become second natureyou'll be able to crank one out in just a few minutes.
Part I: Introduction to FileMaker Pro
Your First Database
Organizing and Editing Records
Building a New Database
Part II: Layout Basics
Advanced Layouts and Reports
Part III: Multiple Tables and Relationships
Multiple Tables and Relationships
Advanced Relationship Techniques
Part IV: Calculations
Introduction to Calculations
Calculations and Data Types
Part V: Scripting
Part VI: Security and Integration
Exporting and Importing
Sharing Your Database
Part VII: Appendixes
Appendix A. Getting Help