(System_Library)
Description: This function attempts to position a dialog so that it is not started beyond the left, right, top, or bottom of the visible screen.
Returns: Nothing
Usage: Script
Format: \System\DialogInitPos(XPosPtr, YPosPtr [, DefaultXPos, DefaultYPos, DlgWidth, DlgHeight])
Parameters:
XPosPtr {
pointer } { required } { no default
}
A pointer to the
dialog's X-position variable. The X-position will be modified by this function
if the dialog is beyond the left or right edge of the screen.
YPosPtr { pointer } { required } { no
default }
A pointer to
the dialog's Y-position variable. The Y-position will be modified by this
function if the dialog is beyond the top or bottom edge of the screen.
DefaultXPos { numeric } { optional }
{ no default }
An
optional parameter that is any numeric expression giving the default X-position
to use if the value of the XPosPtr is Invalid. It is also the X-position that
will be used if the dialog is beyond the right edge of the screen and Width is
Invalid. Default is 0.
DefaultYPos { numeric } { optional }
{ no default }
An
optional parameter that is any numeric expression giving the default Y-position
to use if the value of the YPosPtr is Invalid. It is also the Y-position that
will be used if the dialog is beyond the bottom edge of the screen and Height is
Invalid. Default is 0.
Width { numeric } { optional } { no
default }
An optional
parameter that is any numeric expression giving the width of the dialog.
Height { numeric } { optional } { no
default }
An optional
parameter that is any numeric expression giving the height of the dialog.
Comments: This module is a member of the System Library, and must therefore be prefaced by \System\, as shown in the "Format" section. If the application you are developing is a script application, the System variable must be declared in APPMOD.SRC and need not be prefaced by a backslash in the function call.
Calling this function before starting a Window() call will reposition a dialog's starting position so it will not be drawn entirely off-screen. This is only necessary if the dialog's X- and/or Y-coordinates are retained. The width and height of the dialog are optional; if provided, the dialog will be prevented from being drawn partially beyond the bottom/right edge of the screen; otherwise only the top/left corner of the dialog will be guaranteed to be drawn on-screen. There is no return value.