Regions that have the desktop as their parent often do not appear centered in the application when running on resolutions other than that of the primary development environment. One approach is to place ESL regions, including Dialog Regions, in the primary window ancestry. For Dialog Boxes, however, this is not an option, since Dialog Box must be children of the desktop. You can easily change the position of application objects whose parent is the desktop with a generic routine. The following sample code will centre all Dialog Boxes relative to the primary window:
Instead of centering regions based on the Primary window, as defined by the "Primary_GR" in the above example, the regions can be centered on the desktop by simply replacing the token "Primary_GR" with the keyword "desktop".