Saving Window State

When developing in FileMaker, the feature set it offers accounts for a good number of common tasks and provides easy solutions for most of these problems. There are a few issues, however, which FileMaker either hasn’t addressed or wants to leave up to the developer.

One of these is saving the current window state. This applies to tab panels, sliders and moving from layout to layout or when closing the file. The desired result, for the end user, is to simply return to where they left off when returning to a layout.

Obviously, it’s very comforting to come home to the same arrangement of furniture after leaving your home. If a user leaves a layout having made a complex selection of tab panels, sliders and button bars then it makes sense to be the courteous developer and put them back into the same state.

This video showcases a powerful method for saving the state of windows. It applies to all panel type objects and even when closing the file. If keeping your user interface nice and tidy is something you’re interested in for your own solutions then make sure and watch this video!

AttachmentSize
SavingWindowState.zip232.71 KB

Comments

Try this...

1. Open your demo file and go to Tab 2
2. Select slide panel 3 (Products)
3. Select Tab 3
4 Close File
5. Reopen File

Your solution correctly recalls Tab 3...but when I go back to Tab 2 it has been reset to slide panel 1 (Customers).

Is there a way to make your solution remember the positions of nested tabs and slide panels?

True, it does not save each individual panel and and what sub panels were selected.

This can, however, be done using the information shown in the video. It would simply require you to define a new Window domain with something like LayoutGlobal ( "panel.info.subpanels" ).

You would have to code up the logic to make it happen. The only thing the demo file does is save all of the front most panels on the current layout, not sub panels of panels.

But again, the good news, it is possible to wire up.

-- Matt Petrowsky - ISO FileMaker Magazine Editor