Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Adding a portal to the Lease Agreement layout may streamline your workflow, but the portal's size and position don't make for a harmonious layout. Plus, the Lease Document container field would be more useful if it were larger. But if you make it too big, that field will dwarf all the other data on the screen, making it hard to focus on the text data.
That's where Tab Controls come in. The name makes it seems as Tab Controls have something to do with the Tab key on your keyboard, but they don't. They provide a way to organize data on a layout so you can focus on one chunk of data at a time. Tab Controls also let you put far more information on the same layout without making either a giant layout or one that's crammed with data. You've seen similar objects in other software programs, even other places in FileMaker itself. For example, the Inspector has three tabs that are used for organizing all the information it has to hold. A Layout Tab Control works much the same way (although without the collapsible sections—that would be so cool). Figure 4-17 shows the Lease Agreement layout reorganized using a Tab Control.
Tab Controls are easy to draw, but since it can be tricky dividing the objects on an existing layout amongst the new tabs, you'll need to do a little prep work. The process is easier on a larger monitor, but can be done even on a small one. First, expand the database's window as large as your monitor will allow. If it's not big enough to show you about double the width of space as you currently have showing, try Zooming out.
Next, follow these steps:
Drag all of your fields and field labels waaaay over to the right so they're past the edge of the line that represents the edge of your layout. Use Figure 4-10 as a reference to see how far you need to move your fields.
If you don't move your fields, the new Tab Control will be on top of them in the layout's stacking order and it won't be easy to select them afterwards. Although you'd think that the "Send to Back" command will fix things, it doesn't always, so it's just better to empty out the space first.
In the Status toolbar, click the Tab Control tool. (It looks like a tiny tab.) Then, draw a large tab panel on the layout.
It should be as wide as the dividing line between the Header and the Body part and nearly the height of the Body. The Figure has the left edge of the Tab Control on the left edge of the layout, and its bottom edge is on the bottom edge of the Body part. When you finish drawing, the Tab Control Setup dialog box (Figure 4-18) appears.
In the Tab Name field, type General, and then click Create. Repeat this step for two more tabs: Payment and PDF.
FileMaker adds the three tab names to the Tabs list. The first tab you create is set as the Default Front Tab. That means the General tab will be the active one whenever you switch to the Lease Agreement layout—no matter which tab was active the last time you left it.
Select Full from the Tab Justification pop-up menu, and then select Square from the Appearance pop-up menu.
The Full option will make the tabs appear all the way across the top of the Tab Control itself. Square means the tabs won't have rounded edges.
When you're done, click OK to close the Tab Control Setup dialog box.
Your new tab panel, complete with three tabs, sits highlighted in place on your layout.
Notice four selection handles, one at each corner, and a dark box around each of the tabs. Any formatting changes you make with this selection will affect all three tabs. The Tab Control in Figure 4-18 has the same background color as the Body part and a 1 pt. dark grey line. Border effects have been turned off.
Switch to Browse mode, where you'll see that your Tab Control is already working. You can click tabs, and each one comes to the front just as you'd expect. But a Tab Control without objects is pretty useless.
Switch back to Layout mode to divide your objects and move them onto their proper tabs. First, select the fields and field labels that belong on the General tab (refer back to Figure 4-17, if you need a refresher). Then drag those fields onto the General tab. Choose File→Manage→Database to create a Notes field (Text type), and then put it on the General tab, too. Use the Inspector to add a vertical scroll bar to the Notes field.
Repeat the process to move the Payment portal and its fields to the Payment tab. Double-click the portal to view the Portal Setup dialog box, and then increase the number of rows. Finally, move the Lease Document field to the PDF tab and make it larger. Try to maintain its proportions, after all it's displaying an 8.5 x 11 inch document.
Note:
If you use the Arrange→Send to Back command for an object that's on a Tab Control, the selected object goes behind other objects on the same tab, but not behind the Tab Control itself.
As you just saw, you can add a Tab Control any time you need to fit more stuff on a layout. And once it's there, you can add or delete panels or change the control's appearance. Edit a Tab Control by double-clicking it in Layout Mode to summon the Tab Control Setup dialog box.
In the Tab Control Setup dialog box, you can add new tabs by typing a name, and then clicking Create. The new tab appears at the end of the list of tabs, and to the right of the existing tabs in the control. You can also rename an existing tab: Select it in the list, enter a new name, and then click Rename.
To delete a tab, select it in the list, and then click Delete. When you delete a tab, you delete all the objects on that tab. (If the tab you select for deletion has any objects on it, FileMaker warns you first, and asks whether you're sure you know what you're doing.)
Finally, you can control the tab panels' order. FileMaker draws the tabs in the order they appear in the Tabs list. The leftmost tab panel is the one that appears to the top of the list, and so on. Rearrange the list using the arrows to the left of each name. FileMaker's smart enough to move the objects on each tab along with the tabs themselves when you reorder.
When you first switch to a layout but before you've clicked a tab, FileMaker needs to decide which tab to show automatically. You tell it which one by choosing the appropriate tab name from the Default Front Tab pop-up menu. While it's possible to choose any of the tab panels, be aware that most places where tabs appear, the leftmost tab is usually the front tab. If there's a compelling reason for a tab to always be in front when you first see a layout, it's pretty likely that that tab should be on the left, too.
If the total width of all your tabs is less than the width of the Tab Control itself and you haven't chosen Full justification, then FileMaker lets you choose where the grouping of tabs should be positioned. It's a lot like aligning a paragraph of text: choose from Left, Center, or Right and the tabs will bunch up according to your selection.
Note:
If you have more tabs than can fit given the size of the Tab Control, then FileMaker simply doesn't show the extras. You can either force the tabs to be narrower using the Tab Width option (see below), make the Tab Control itself bigger, or make the tab names shorter.
FileMaker can draw tabs with Rounded or Square corners. This option is purely cosmetic, so choose whichever one you like from the Appearance pop-up menu.
Note:
If you're publishing your database on the web using Instant Web Publishing (Section 17.2), rounded rectangles (tab panel tabs and buttons included) render with square corners. They work just fine though.
The Tab Width pop-up menu has several choices to influence the width of the tabs:
The standard setting, Label Width, makes each tab just wide enough to hold its label.
"Label Width + Margin of" adds the amount of additional space you specify around the label text. The label's text will be centered within the tab.
If you prefer all your tabs to be the same width, choose "Width of Widest Label". FileMaker figures out which label is biggest, sizes that tab appropriately, and then makes the others match. This setting may push some tabs out of view if they won't all fit with the new width.
If you'd like all your tabs to be a nice consistent width, but with the ability to accommodate the odd long label, choose "Minimum of". Enter a minimum width (75 pixels, say), and every tab will be that width, unless the label is too big to fit, in which case that one tab will widen enough so the label fits.
If you want the utmost in control and uniformity, choose "Fixed Width of", and then enter a width in the box. Every tab is exactly that width. If the label's text is too big, then FileMaker cuts it off at the edges.
Power Users' Clinic: Tab in a TabIf your layouts have more doodads than the bridge of the Enterprise, take heart. You can put a Tab Control on another tab for even more space savings. That's right. You can put tabs inside tabs inside tabs. So long as the new control sits entirely inside an existing tab, it behaves just like any other object on a panel. It sits there quietly behind the scenes and doesn't make an appearance until you click its enclosing panel. Only then is it visible, in all its tabbed glory. Needless to say, the more you use the tab-within-a-tab technique, the more complex your layout becomes—and the more potentially confusing to anyone using your database. Multiple nested tabs can also dramatically increase the amount of time it takes your computer to draw a layout when you're sharing a file using FileMaker Server (Section 17.3). Use this technique sparingly. |
Note:
Full tab justification overrides some settings in the Tab Width pop-up menu, so if you're making changes and don't see what you expect, make sure you haven't selected Full in the Tab Justification pop-up menu.
Out of the box, Tab Controls are medium gray, embossed, with a thick black border. But you can change that institutional look to match your carefully crafted layouts. In the toolbar's Formatting Bar, just use the fill and border tools to make your selections. You can even select each tab panel individually; the choices you make apply only to the currently selected tab. To select the whole Tab Control (all its tabs and all the objects on each tab), use the selection rectangle or Shift-click each tab panel.
Tip:
If you accidentally format a single tab panel when you meant to format the whole tab control select your newly formatted tab and use the Format Painter (Section 3.5.1) to apply formats to each unformatted tab panel.
If you don't want a Tab Control after all, just select it, and then choose Edit→Clear, or press Delete or Backspace. FileMaker warns you that it's about to delete all unlocked objects on the tab panel as well. If that's all right with you, click OK. If you need to keep fields or objects on the tab panels, though, click Cancel, and then move the keepers off the panel (way to the right of your layout, perhaps) for safekeeping.