Tab Panels

Dialog boxes are great examples of packing lots of stuff into a small space. Think about how the Layout Setup dialog box (Figure 6-18) works. When you first open the dialog box, you see a tab called General, which consolidates the most popular tools in one place. Two other tabs (Views and Printing) keep those categories of options out of your way until you need them. The Tab Panel tool and its controls help you use these same concepts to organize lots of objects on a single layout.

6.8.1. Creating a Tab Panel

If you want to add another set of fields to hold the work addresses of the contacts in your People database, you have to make the layout bigger in order to hold your new fields. But there are times when you just can't stretch a layout any farther. Maybe some of your employees have smaller monitors and you don't want them to have to scroll to see everything on the layout. Or you may feel you've already created a beautiful layout, with perfect proportions, and stretching it just to add a few more fields would ruin the design you worked so hard to create. Whatever the reason, if you don't want to make a layout bigger, you can organize lots more fields by adding a tab panel (Figure 6-36)

Here's how to use your existing detail layout (in the People database) to create a new layout using a three-tab panel:


Tip: You can change the tab panels individually if you want to. Click outside the tab panel to deselect it, then click the tab you want to change independently of the others. To reselect the whole panel, use the rubber band technique (Section 4.4.6.2).


  1. Change the tab panels to a lighter gray, using the Fill Color palette.

    You can also change the tab panels' font, font size, style and color if you wish.

  2. Click the Address tab to make it active.

    You're getting ready to move the fields into place on the tab panel.

  3. Select the set of address fields you moved out of the way earlier and drag them onto the Address panel.

    Repeat steps 2 and 3 to move the Phone and Email fields to the Contact panel and the Notes field to the Notes panel.

  4. Switch to Browse mode to test your panel.

    Click the panels to see how the fields appear and disappear along with their panels.

There's plenty of room on the Address panel for another set of address fields to hold a separate work address. You can define them now, if you like, and place them on the Address panel. (See Section 3.2 for a step-by-step tutorial on defining new fields.)

All the fields you've moved onto the tab panels are now firmly attached to those panels. If you move the panel, all the fields move along with it, so there's no need for fancy selection techniques. Just drag the panel to your new location, and you're golden. You can even copy the whole panel and paste it onto another layout. It works just as it did in the original location.


Warning: Tab panels are brand-new in FileMaker 8. Although earlier versions can open .fp8 files, some features, like tab controls, don't work in those versions. Folks using FileMaker 7 or earlier can't see your lovely tab panels, for example. Instead, they see a jumble of fields piled on top of one another.


6.8.2. Editing Tab Panels

You can edit a tab panel by double-clicking it to summon the Tab Control Setup dialog box.

POWER USERS' CLINIC

Extra-Strength Tabs

As useful as they seem on the surface, tab panels have a few hidden secrets that you can use to your advantage.

  • If you leave a tab active in Layout mode, that's the panel that's always active when you return to that layout. Try it on your People file. In Layout mode, click the Contact tab to make it active. Switch to Browse mode and click the Address tab. Now, if you switch to any other layout, then come back to Data Entry, the Contact tab is always the active one.
  • Another way to go to a specific tab, without clicking the tab itself, is to make a button with a Go to Field [] action. Make sure the field is on the tab you want to be active. Every time you click the button, the tab that contains the field in your Go To Field [] action comes forward.

You can nest tab panels inside one another for even more space. So long as the new panel 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. Then, up the new panel pops, in all its tabbed glory. Download the file People Tab Panels from www.missingmanual.com/filemaker to see this trick in action.

If you make a set of changes and realize you've made a mistake, just click the Cancel button. All changes you've made to the tab panel since you opened the dialog are swept away, even if you deleted some panels, added some and rearranged the furniture while you were in there. But once you click OK, your changes are written in stoneat least until you revisit the Tab Control Setup dialog box.

6.8.3. Deleting a Tab Panel

If you don't want a tab panel after all, just select it and choose Edit Clear or tap Delete. FileMaker warns you that its about to delete all unlocked objects on the tab panel as well (Figure 6-38). If that's the way you want it, click OK. If you need to keep fields or objects on the tab panels, though, click Cancel, then move the keepers off the panel (way to the right of your layout, perhaps) for safekeeping.

Figure 6-38. If you try to delete a tab panel, FileMaker also deletes all the fields you've placed on the tabs, so it wants to make sure you really mean it. You can avoid this dialog box if you move all fields and buttons off each tab and onto another part of the layout first.

Категории