CENTER method

This method automatically centers your form in the users display.

WINDOWS object

call exec_Method( winID, "CENTER", bOnParent, newSize, bCalcOnly, parentSize, options )

Parameters are as follows.

ParameterDescription
bOnParentIf TRUE$ then center on parent, otherwise on the desktop
newSizeRequested SIZE (all fields default to "-1" )

<1> Left-Position (-1 means center it on the X-Axis)
<2> Top-Position (-1 means center it on the Y-Axis)
<3> Width (-1 means leave the window width as is)
<4> Height (-1 means leave the window height as is)
bCalcOnlyIf TRUE$ then return the calculated position, do not apply it
parentSizeOverrides actual parent size or desktop size (depends on bOnParent)
options<1> Force Boundary Check - If TRUE then check that the frame is within the bounds of the desktop. Usually this is only checked if we do not specify Left and Top coordinates (i.e. newSize<1> and newSize<2> are both "-1")
<2> Desktop "anchor" window ID. This field can contain the name of an "anchor" window - this means the frame will be centered on the same monitor as the "anchor". (This option is only applicable if centering on the desktop).
  • guides/programming/programmers_reference_manual/center.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1