This is the first in a series of articles that will present some useful and time saving tidbits for various areas of FileMaker. In this first article we focus on layout mode. There is no rhyme or reason, no common theme - just an assortment of our favorite time-savers, shortcuts, tips, hints, tricks, tools of the trade and more:
We all know the shape tools. You know - those tools to draw lovely lines, circles and squares? There are a couple of cool shortcuts that can be used in conjunction with these tools.
Holding the shift key while using the line tool will snap the line to a vertical or horizontal alignment - perfect for drawing straight lines!
Did you know that holding the option key (ctrl on windows) while using the line tool will snap the line to a 45, 135, 225 or 315 degree angle? This can be useful for drawing triangles or any other shape where an angled line is required.
Sometimes you want to draw a perfect square or circle quickly. Rather than drawing something akin to humpty-dumpty and then using the inspector to fix the dimensions, you can instead hold the option key (ctrl on windows) to fix the width and height to the same dimensions. Now you too can make perfect circles every time.
The option (ctrl) modifier key even works with all of the other layout drawing tools and object tools as well.
Remember to never draw a line with an initial width of 0pt and then change it to 1pt or higher. This is going to result in a blurry line due to a FileMaker rendering bug that has been around for a while. This is an issue on both mac and windows. One of the lines below is not like the other...
There are a number of ways to create copies of objects on a layout. The first is simply selecting an object and using the copy/paste commands (cmd/ctrl c/v). When using this option the pasted object will be moved to the location of where the mouse was last clicked on the layout. In fact, the last clicked location will be dead centre of the pasted object, so if you want to quickly paste an object in a location of the layout, click there before pasting.
The option key (ctrl on windows) can be used to drag a copy of an object. Select an object, then while holding the option key, drag the object to a new location. Release the mouse while still holding the option key. Use this in conjunction with the shift key (for locking to horizontal/vertical alignment) to copy an object and keep it in-line with the original.
Finally there is the duplicate command. You may be wondering why you would bother using duplicate when you could just as easily use copy/paste or option-drag. Well, the duplicate has a nifty feature built into it.
Select an object - let's call it A - and duplicate it (cmd+D). Now move the new object - B - to some location, such as beneath the original object A using either the keyboard arrow keys or the mouse.
If you now duplicate B, you'll notice that the resulting duplicate C is positioned relative to B, in exactly the same way B is positioned relative to A.
Now duplicate C to get D, and D will be relative to C the way it is relative to B and so on....
You can use this technique to quickly create a series of objects all evenly spaced.
Here's a quick tip - don't waste time designing layout controls or formatting objects if they have already been designed elsewhere. You can really speed up your development by reusing existing objects from other layouts and re-purposing them for your requirements. In fact in most cases once a database reaches a particular point, there is very little need to create any object from scratch because it should already reside somewhere in the system waiting for you to copy it :-)
The format painter is a great tool for quickly applying formatting styles to objects on a layout. It exists in the status area as a paint icon.
To use, select a layout object. Then click the format painter icon. Now select another object on the layout to apply the formatting from the originally selected object.
The format painter tool can also be locked in the ON position by double-clicking the icon. This lets you select an object and then apply its formatting to multiple objects. When finished, click on the selection tool icon, or press the escape key.
In fact it's not just the format painter that can be left in the locked position - every tool in the picture shown above can be locked in the ON position - this is great for creating lots of lines, circles, squares, portals, you name it.
Format painter is great, but what if you need to apply a style across a large number of objects? Lets say for example you have a layout with 100 text labels on it, and you wish to apply formatting from another label to all labels on this layout.
You could use the format painter in its locked mode and click on all 100 labels to change them, but there is a better way.
When the format painter tool is used on a series of grouped objects, the formatting is applied individually to all objects in that group. So, to format the 100 labels we simply need to group them. This could be a case of dragging a text selection box over the labels and grouping them. If the labels are sporadically placed on the layout, you can use a nifty shortcut to select all layout objects of a particular type.
Cmd+Option+A (ctrl+shift+A on windows) will select all like objects on a layout, such as text labels. Once selected, just group them into a single object and apply the formatting to that grouped object. When done, ungroup them.
Tab controls can contain many tabs and many objects on those tabs, so what happens if you want to make a new tab control with the same formatting but none of the contents? The first step is to make a copy of the existing tab control object.
Here is a pretty complex tab control object that contains many internal objects and other layouts of tabs.
For the first method, go into the tab control setup and remove all tabs apart from the first one (at least one tab is required to retain formatting).
This leaves you with just one tab to clear of contents rather than all tabs. When done, just go back into tab control setup and add your new tabs. Remember that when in tab setup don't remove all tabs and begin re-adding tabs, otherwise all formatting is lost. Make sure you leave 1 tab and click OK before going back in and adding your tabs.
The second method involves resizing the tab control object in a way that all contents that were in the tabs are no longer inside the object. To do this, drag the lower left corner of the tab control up to the upper right corner and keep going until the tab control object is completely outside the realm of the contents, as shown below.
As you can see above, the tab control is now a tiny object in the upper right corner. Because everything is no longer in the tab, it is all combined into a large mess of objects overlapping one another. This is fine though because it makes it really easy to drag a selection box over it all and hit the delete button.
Now just resize the tab back to whatever you want. The cool thing about this method is all the original tabs and their names are retained. You can restore it to its original dimensions using the "resize to largest width and height" command.
The arrange menu contains so many great and powerful tools (and shortcut keys) that if learned will greatly improve your productivity, especially if you can use the shortcuts available without having to resort to the inspector or the menu. When arrange tools are used in conjunction they can make seemingly tedious tasks much faster.
As an example, let's say we have a series of labels we want to align to be horizontally spaced and left aligned.
First, begin by positioning Object 1 and Object 6 to the top and bottom coordinates you want the objects to be spaced in. Don't worry about everything else just yet.
Next, for all the other objects, put them in the order you want them to appear. Again, don't worry about any spacing or alignment just yet: as long as one is beneath the other it's all good.
Once done, you are ready to do the final steps. Select all of the objects and left-align using cmd+option+left (ctrl+alt+left on windows). Now simply use the align vertically command and you are done.
The key here is that once you have your top and bottom objects positioned, and everything in between, the rest is really simple.
Selecting objects on a layout can be done in the following ways.
First is simply clicking the mouse on an object to select it. Holding the shift key will let you individually select multiple objects.
Drag the mouse button to select multiple objects. All objects that fall entirely within the selection box will be selected.
Holding the option key (ctrl on windows) while dragging will draw a special selection box that will select any object that partially falls within the selection area.
Cmd+A (ctrl+A on windows) will select all objects on the layout, locked or otherwise.
With an object selected on the layout, use Cmd+Option+A (ctrl+shift+A on windows) to select all other objects of the same type on the layout. This is a really awesome feature that can really assist with development, as discussed below.
We have already touched on a few uses of the "Select Same" command above, but have you ever thought of using it as a means for finding objects on a layout?
Hidden tab controls are becoming ever more popular as a means for showing and hiding layout content. The problem however is that they can be a real pain to develop - they're hidden! One quick way to find hidden tab controls is to use the "Select Same" function. Select an existing visible tab control on the layout (or add one if there is none). Then with it selected, use the "Select Same" function - this is going to select all tabs, including hidden ones. From there you can locate the edge of the hidden tab for selection.
Another way of locating hidden tabs is to apply a blank tooltip to its tab controls, and then turn on "show tooltips". hidden tabs will appear as tooltip badges where you would not expect a tooltip to be :-)
Finally we have a tip for resizing text labels. How often do you copy and paste an existing label only to change its text and realize the dimensions of the label are now way too big?
This is a really common problem when the text in a label changes. The easiest way to snap the dimensions of the label to their smallest dimensions is to change a style of the label and then undo that change. Making the label bold/underline/italic is a really easy way to do this. Underline for example would be cmd+shift+U twice.
Sometimes you may notice that your label does not snap to the smallest dimensions with this technique. There are a few reasons why this may happen, but they all are concerning paragraph settings of the label as shown below.
For a label to snap to smallest dimensions, vertical alignment must be top and horizontal alignment must be left. There can be no indents or lines above/below. Line spacing must be 1pt.
If your text has justified alignment, then the label will snap to the smallest height, but not width.