Making FileMaker Object Grids Behave

There’s a lively discussion on the [TechNet]( mailing list right now about the pros and cons of FileMaker Pro’s *Object Grids* feature. This is certainly an opinionated discussion, and there is clearly no “right” way. A lot of people find Object Grids *annoying* because it makes it *harder* to line things up sometimes. Here’s a quick tip to help get Object Grids to behave themselves. I love Object Grids, and leave them on almost all the time, but I don’t think I’d feel this way without the little trick explained here.

First, an explanation. The name of this feature — Object Grids — is probably more telling than you realize (note the plural). When you get right down to it, **there is no grid** on the FileMaker Layout. To me, “grid” implies some consistent system of invisible lines that span the entire layout. Something like this:

Picture of a FileMaker Pro database window with a graph-paper-like grid over it.

If you’re like me, you might assume that when you turn on Object Grids, FileMaker starts snapping your objects to a grid like this. But it doesn’t work that way. There is no layout-wide grid, invisible or otherwise. When you turn on Object Grids, FileMaker really just makes objects you drag around move in 6-pixel steps. Essentially, every object is on its own grid, and if you’re lucky, the objects you’re trying to line up will have the same grid. But there’s a chance they won’t.

>Note: Although the default grid spacing in FileMaker is 6 pixels, you can actually configure it yourself. Just visit Layout mode, then choose Layouts -> Set Rulers.

Normally, when you create a new object, duplicate an existing one, or paste one in while Object Grids is on, FileMaker is careful to keep them on a consistent grid that starts at position (0,0) on the layout. But sometimes an object gets off the normal grid, and on to a grid of its own. Maybe it was created or moved when Object Grids was turned off. Or perhaps you used the arrow keys to nudge the object a little at some point in its life. Whatever the reason, once it is off the grid, it won’t line up right anymore as you drag it around. This is especially problematic when you first created a layout with Object Grids turned off, and are trying to start using it.

The trick is to find a way to quickly re-zero an object to the standard grid. And it turns out there *is* a way that is both quick and easy: Just drag the object into the top-left corner of the layout. When you do, FileMaker will abandon the gird and let the object land right in the corner, at position (0,0). Now, just drag it back where it belongs. As you do, it will move in 6 pixel chunks — on the *same* grid as everything else.

Note that you have to actually *drop* the object in the corner. It won’t work to move it to the corner and back in one sweeping drag. Instead, drag it to the corner, drop it, pick it back up again, and drag it back.

This short video shows the technique in action. The first object I drag is already on the grid, and you can see it aligns nicely. The second box seems to have found its own center, so to speak. Using the drag-to-the-corner technique, I quickly get it back on the normal grid.

If you’re switching from a free-form layout to one that works well with Object Grids, you may have to do this little song and dance with every object on your layout. But if you’re been using Object Grids all along, this becomes something you do every now and again to get an object back in line. I find this technique makes using Object Grids a pleasure. I can focus on the big picture, and let FileMaker worry about the pixels.

Leave a Comment

10 thoughts on “Making FileMaker Object Grids Behave

  1. Hey Geoff,

    Nice article.

    I have never used Object Grids — they just bug me — and I probably never will. Who in the hell decided that 6 pixels was a good default? If it had been 5 or 10, I might not have been so quick to discard Object Grids.

    Anyhow, thanks for the article. I always enjoy your input on the lists.


  2. @paul: I know many people in your same camp. No hard feelings 😉

    I think the theory behind the 6-pixel thing is that it divides 72 evenly and works well with a 72 DPI basis assuming you’re in to Inches. For example, 3 notches is 1/4 inch, 6 notches is 1/2 inch, 12 notches is 1 inch, and so forth. I may be making this up though. And you can always change it if you prefer a different grid size.

  3. While I can see how people might want to do this, I always set my Rulers grid to 1 pixel. I use an Cmd-Opt-Arrow key combo to align selected objects. Combined with the Cmd-drag to select objects touched, you can line up a lot of objects quickly.

    There’s obviously 2 different types of people in the world, those that align their objects first, and those that align them after. But I don’t like to button my shirts sequentially either :-]

  4. @fenton: I think for me the bigger advantage of the grid is not alignment, but spacing. It is usually pretty easy to ling things up visually (if they’re off by one pixel it is pretty obvious if they’re reasonably close). But it is hard to tell if they’re equally spaced. The “distribute” options in the alignment window work well for a set of items, but not when you want to add another item to an existing collection and keep the spacing perfect.

    With grids, I just know tacitly that these sorts of things are one grid-unit apart, and some other objects should be two units apart. Once everything is snapped to a single grid (per the tip on this page) then it is super-easy to put stuff in a tab control and be sure they’re correctly inset from the top and left. Or to put a collection of fields together and know they all have the correct spacing between them.

    For me at least, it is really hard to see if something has the right amount of space. When I don’t use grids, I find I’m always overlapping edges, then pressing the arrow key the prescribed number of times to get it into place. With grids it is just much easier for me to throw it in place and move on.

  5. Geoff, thanks for this post. I’ve personally NEVER used grids because they always bugged me and I have QuicKeys set up for aligning objects quickly.

    However, I must say, you’ve inspired me to adjust my ruler settings to a setting which accounts for a default value of space between buttons. After aligning my first button off the 0,0 grid, I’ll likely work without the grid for designing the layout. When it comes time to place a new button relative to another I’ll quickly toggle the grid on, place the second button – and then turn it back off.

    Thanks for the info!

  6. Geoff: I’m with you! LONG LIVE THE GRID!! So many times I hear a developer talk down the grid and complain that they don’t have as much control with it. Then I see their work and think, “yeah, I can SEE that you don’t use the grid.”

    As for the use of a 6-pixel grid, I think it’s perfect. Why? Because it’s divisible by both 2 and 3 (and any multiple, natch). This makes it very flexible.

    If only FileMaker would let me check that most wonderful of all settings, “always align pasted objects to grid” …

  7. The grid allows me to work faster, without bothering about alignement. So I usally have it turned on. But there are times, when the layout ‘grows up’, that a tip like this is really helpful. Thank you.

  8. Hi Geoff
    I use the grid always but I set it to 5px increments.
    Now all my objects are placed in intervals of 5px and their size is always in increments of 5px. I can quickly see if something doesn’t line up the info box when any measurement does not end in 0 or 5.

    Of course some objects just won’t fit squarely but I always try where possible.

    IMO. Once you get used to it there is no turning back.

  9. I agree with Geoff- consistent vertical spacing of field baselines has always been a pain. Before seeing this post I thought fmp grids were a cruel joke, that the programmers were sitting around during breaks laughing at the emails OCD interface designers. No doubt fmp could benefit from a true layout grid.

    So, here’s a nuance discovered after reading this post… you don’t have to grab one object at a time, and you don’t have to go to 0,0 if you just want to reset baselines. Grab a whole row of fields and labels that are already aligned with each other, hold down the shift to maintain vertical alignment, and drag all of it to the top and back. Then entire row will conform to the horizontal gridline and spacing between rows is automatic from that point… just be sure of the spacing first! Wouldn’t it be nice to be able to lock objects onto a layout grid and adjust every object on the layout by tweaking the grid?

  10. John:

    100% correct. Thanks! If you only need get the object on the grid in one direction, you can drag to one edge rather than the corner. Cool! I never thought about it.