Want to adapt your application’s interface to your end user’s system preferences? Want to make sure your application’s interface isn’t obscured by the macOS dock or menu, or by the Windows taskbar? In this blog post, we’ll show you how!
On macOS, you can place the dock on the left, right, or bottom of the screen. You can also change its size, which resizes the work area. On Windows, you can place the taskbar on any screen border and change its size, which also resizes the work area.
One of the great things about 4D v18 R2 is that now (on both systems), you can take these graphic system elements into account, use the entire available work area, and be sure your windows are in a viewable area (especially in SDI mode on Windows).
The work area, what’s that?
On Windows, the work area is the part of the screen that’s not hidden by the system taskbar. The coral rectangle in the screenshots below highlights the work area:
On macOS, the work area is the portion of the screen that isn’t obscured by the system taskbar or menu:
How to get a screen’s work area?
We’ve added an optional parameter to the SCREEN COORDINATES command:
SCREEN COORDINATES($left;$top;$right;$bottom;$screenNumber;Screen work area)
Now you can ensure that your windows are in the correct place or you can use the entire work area, the choice is yours!