A READER ASKS
We have some difficulties about disabling close(X)-button in FileMaker.
Well, we have a thing here because what close(X) do you mean?
Not only is there different situations for when the close(X) button appears in FileMaker but to make matters a bit more difficult ... on a Windows based machine, there is an application close(X) button (often referred to as the RED X) and a window close(X) button. With FileMaker, the close(X) button might just be closing one of the many open windows for a file or it might be closing the only open window for a file. FileMaker behaves differently in each case.
So the need to control the close window experience can be ...
- you don’t want FileMaker to quit without confirmation (windows OS)
- you don’t want a file to be closed without confirmation
- you don’t want the window to be closed without confirmation
- the closing window step (whenever used) needs to perform an action
The distinction because important because you are now wanting to override a default FileMaker action and you have to take into account all the dependent operations you might be affecting. This can fall into the category of “one step forward = two steps backward.”
THE SHORT ANSWER FOR CLOSING THE APPLICATION (Windows)
I believe the only way to control this is via a third party plug-in such as ...
SecureFM (www.nmci.com) by New Millennium
MenuControl (www.dacons.net) by Dacons
Both of these are x-platform but I haven’t used either recently, so you would have to test them out for yourself.
“WELL ACTUALLY” ANSWER FOR CLOSING THE APPLICATION (Windows)
In the category of ... that is really not an option for me ... you can setup your solution to run in Kiosk mode and that disables all menus and buttons have to be in place for everything.
THE SHORT ANSWER FOR CLOSING A WINDOW
The Close Button action is much the same as using the Close menu command. They are not exactly the same but you can trick FileMaker to behave in a predetermined manner by using a script and the Custom Menus option in FileMaker Advanced. You can remove the close option from a custom menu set and then replace it with a scripted action. You can assign that custom menu close window action to have the keyboard shortcut of Command W (mac) or Control W (windows).
So then the script can simply have no script steps at all (other than Allow User Abort step set to the OFF position) and clicking the close box has no effect.
LAYOUTS USED AS DIALOG BOXES IN NEW WINDOWS
If you are popping up a new window and going to a layout that looks like a dialog box, then you can Pause the script that opened the window. The buttons on the layout then can run script steps that resume the paused script or halt it completely as they perform their default actions.
Here are some links to other posts that might be of interest in regards to this topic...
Layout Buttons With Script Options
EXAMPLE FILE: Button Scripts And Options
EXAMPLE: Exit or Halt Script Steps
PRE FILEMAKER 7 OPTIONS
If you're using FileMaker 7 or earlier, you can try using a third party plug-in. For example, you can use the SecureFM plug-in from New Millennium to trap these types of actions. Of course, with any older version of FileMaker, the availability and reliability of older third party products might be an issue with newer operating systems or updates to older operating systems.
More info about the author and FileMaker in general, contact me at email@example.com.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.
====================== ADVERTISEMENT ==============================
Click Here To See The FileMaker Book (via a blog) homepage!