1 Reply Latest reply on Oct 10, 2011 3:05 PM by TSGal

    Get ( WindowDesktopHeight ) ignores the Mac OS X Dock

    Ward

      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.

        • 1. Re: Get ( WindowDesktopHeight ) ignores the Mac OS X Dock
          TSGal

          Ward:

          Thank you for your post.

          This has been brought up before (not on the forum), and Get (WindowContentHeight) will always return a number representing the height of the FileMaker Pro content area.  The same goes for Get (WindowContentWeidth), even when the Dock is displayed on the Left or Right side.  Keep in mind that the area behind the Dock is usable, as you can move the window downwards behind the Dock.

          Your workaround for usuable screen height (or width; depending on location of the Dock), is excellent.

          TSGal
          FileMaker, Inc.