Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Window.FindByTitle
This function can be used to find the Reference to the window.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Window | 1.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
WindowName | The Name of the window to find | MBS_DevTool | |
allowOtherApps | Available in MBS FileMaker Plugin 14.4 or newer. Whether to allow finding windows of other applications on Windows. By default we only search windows belonging to FileMaker Pro itself. |
0 | Optional |
Result
Returns window reference number or error.
Description
This function can be used to find the Reference to the window.The reference is the Operating System's unique ID for the the window. Many of the other functions use the WindowReference to target the window.
The window reference is only valid until the window is closed.
If 0 is returned, no window was found.
Window reference numbers are starting at 15000 and counting up for each new window.
Examples
Application Window Window Ref
Let(
[
/*-----------------PARAMETERS--------------------*/
WindowName =
Case(
Position(Get ( ApplicationVersion ); "Advanced"; 1; 1);"FileMaker Pro Advanced";
"FileMaker Pro"
)
];
/*-------------------FUNCTION----------------------*/
MBS(
"Window.FindByTitle";
WindowName
)
)
Set the Transparency of a window by name
Let(
[
/*-----------------PARAMETERS--------------------*/
FileMakerApplicationWindowName =
Case(
Position(Get ( ApplicationVersion ); "Advanced"; 1; 1);"FileMaker Pro Advanced";
"FileMaker Pro"
);
WindowRef =
MBS(
"Window.FindByTitle";
FileMakerApplicationWindowName
);
Alpha = .5
];
/*-------------------FUNCTION----------------------*/
MBS(
"Window.SetAlpha";
WindowRef;
Alpha
)
)
State of the Window Close Button
Let(
[
windowRef = MBS("Window.FindByTitle"; Get(WindowName))
];
GetAsBoolean(
MBS(
"Window.HasCloseButton";
WindowRef
) = "true"
)
)
Hide a window by name
Let(
[
/*-----------------PARAMETERS--------------------*/
WindowRef = MBS( "Window.FindByTitle" ; "My Window")
];
/*-------------------FUNCTION----------------------*/
MBS(
" Window.Hide ";
WindowRef
)
)
Find window:
MBS( "Window.FindByTitle" ; Get(WindowName))
See also
- Window.SetToolbarDisplayMode
- Window.SetToolbarStyle
- Window.SetToolbarVisible
- Window.SetTopMost
- Window.ShowScrollbars
- Window.ShowsToolbarButton
- Window.ShowTableViewDialog
- Window.ToggleFullScreen
- Window.TopHeight
- Window.Update
Release notes
- Version 9.5
- Changed Window.FindByTitle to return error if empty text is passed.
Example Databases
- WebViewer/Disable Javascript alerts on Webviewer Mac
- WebViewer/Form Fields/Forms Sample
- WebViewer/Form Fields/WebViewer Forms
- Win Only/Window Icon
- Window/Flash Window and Jump Dock
- Window/Fullscreen
- Window/Popover CardWindow
- Window/Window Position and Size
- Window/Window Scrollbar Position
- Window/WindowEffects
Blog Entries
FileMaker Magazin
- Ausgabe 1/2021, Seite 12 bis 13
- Ausgabe 1/2019, Seite 16
- Ausgabe 1/2008, Seite 32
This function is free to use.
Created 18th August 2014, last changed 15th July 2024