Window Controller

Window Controller opens properly sized and aligned windows on both platforms and remembers window settings for every user. Works with FileMaker v8-10.

The main functionality could be reworked to work in v7, but there's no custom menus that make it convenient to save settings.

The problem

Starting with version 7 FileMaker can use multiple windows per file. This functionality came with a full set of of commands and functions to manipulate windows, but as it turned out opening a properly sized and aligned window is a rather tough task.

What I mean by “properly sized” is that a new window should open exactly to the required size and at the exact place. It should not open to some other size and then get adjusted, nor should it open off screen and then get in the view; it should just open and display content.

Although it sounds simple, there's quite a few obstacles that come in the way. The FileMaker command to open a window requires you to specify final dimensions that include window title, borders, scroll bars, but the size of these elements varies between platforms, so windows that are set to display identical content need different dimensions.

To display the same content (shown as a gray rectangle) on Windows and Mac you need different window sizes (red and blue respectively). And this is just the tip of the iceberg...
Windows that display identical content on different platforms.

FileMaker has its own controls and they may be on or off and you need to account for this as well. Sometimes the size of a control may vary: on Mac the user can change the height of the status toolbar, while Windows lets users to change the size of system controls. And this is just about the size; if you want to position a window, you need to calculate even more. And even if you calculated all this, it's just a part of bringing good user experience, because with multiple windows the good behavior is to let the user size and position them (and maybe zoom them) and then just remember these settings.

What's especially inconvenient about this is that all this normally comes to you when you write something else and simply need to open a window. At this moment you're certainly not in the mood to go into complex calculations. This functionality is a very good thing to wrap into something you can call with an option or two.

Window Controller is exactly such a wrapper. I started it in days of v7, it went through several major changes and this is like a fourth version of it, which is both the simplest and most flexible of them all. There's still a room for improvement, of course:

Grab the sample file and see the controller in action and then see what it takes to use it and to install it. The Details describes internal mechanics and why it's set to be so.

Credits

I'd like to thank David Thorp, who found a simpler way to describe alignments; my original idea was far more convoluted.

blog comments powered by Disqus