|WindowRef||Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex functions. Pass zero to access the frontmost window.||0|
|State||The new state of the close button.||1|
Whether to add a close menu if needed. Default is false here.
The name of the filename database where the script can be found.
The name of the script.
Parameter for the script call.
Returns OK on success.
DescriptionSwitches the close button on the window on or off.
Please note! On Windows that SetCloseButton removes all buttons from the title bar and not just the close button.
For runtime solution a special handling is needed. First on Mac you can simply use this function as normal to enable the close button and the window will close.
On Windows simply enabling will not work as the close button is linked to a close menu entry in the system menu for this window. So if AddMenu is true, the plugin will check the menu. If there is no close entry, it will install a default window menu. This way we can enable the close button. To actually close the window, we also install a callback to catch the clicks on this close button. We call your script so you can use the close window script step. This way we can have a close button on the runtimes.
Enjoy and use at your own risk. This function may not work with every Filemaker version, so please test carefully before you deliver. Tested with Filemaker 11.
With plugin version 6.0 or newer the script name can be a script ID number. In that case the plugin queries the script name for the given script ID. This allows to call scripts by ID and avoid problems if scripts are later renamed.
Disable the Window Close button
Enable the Window Close button
Disable the Window Close button in a runtime on Windows:
Feedback: Report problem or ask question.