AnsweredAssumed Answered

Get ( WindowDesktopHeight ) ignores the Mac OS X Dock

Question asked by Ward on Aug 15, 2011
Latest reply on Oct 10, 2011 by TSGal

Summary

Get ( WindowDesktopHeight ) ignores the Mac OS X Dock

Product

FileMaker Pro

Version

11.0v4 Advanced

Operating system version

Mac OS X 10.6.8

Description of the issue

On Mac OS X, Get ( ScreenHeight ) returns the height of the screen in pixels.  When the current window is on the main monitor, Get ( WindowDesktopHeight ) returns the height of the screen minus the height of the Mac Menu Bar.

When I described Get ( WindowDesktopHeight ), I almost wrote "returns the usable height of the screen."  But that's not the case.  The usable height is actually the space between the Menu Bar and the Dock (if visible).

FIleMaker recognizes the concept of usable height -- in a List view, clicking the green window resize button moves the window to the top of the screen (touching the Menu Bar) and sets the height so the window extends just to the top of the Dock.

I'm currently coding a specialized "Resize to Fit" script that I'd like to behave like the green resize button, making sure the window does not slide beneath the Dock.

It seems to me that Get ( WindowDesktopHeight ) should consider both the Menu Bar and the Dock.

Steps to reproduce the problem

1.  Use Tools > Data Viewer to display Get ( WindowDesktopHeight ).

2.  With a List view active, use the green resize button to expand the window to full height, with and without the Dock visible.

3.  Observe that Get ( WindowDesktopHeight ) ignores a visible Dock.

Expected result

I think Get ( WindowDesktopHeight ) should return the maximum window height calculated by the green resize button.

Actual result

Get ( WindowDesktopHeight ) always returns the height of the screen minus the height of the Menu Bar, ignoring the Dock.

Exact text of any error message(s) that appear

n/a

Configuration information

Mac OS X 10.6.8

Workaround

I'm considering adding an On Open script to determine the usable screen height:

1.  Open a dummy List window.
2.  Invoke the Adjust Window [ Resize to Fit ] script step.
3.  Save the value of Get ( WindowHeight ) in a global variable.
4.  Close the dummy window.

Outcomes