Preferences Component
Fnd_Pref_SetWindow
Fnd_Pref_SetWindow ({{name}; window ref})
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | Pointer | Name of the preference item (optional) |
| window ref | Longint | Window to save (optional) |
Description
Fnd_Pref_SetWindow (name; left; top; right; bottom)
Parameter Type Description name Text Name of the preference item left Longint Left coordinate top Longint Top coordinate right Longint Right coordinate bottom Longint Bottom coordinate
This routine saves the coordinates of the current window in the user’s preferences file. The values can be set either by using the window reference or the left, top, right, and bottom coordinates. To save the values using the window reference, pass a preference name and the window reference number that has been returned by one of 4D’s window opening commands. If no name is specified, the current process name is used. If no window is specified, the frontmost window of the current process is used. See the example in Fnd_Pref_GetWindow. To save the values using the left, top, right, and bottom coordinates, pass a preference name and the coordinates. There are no optional parameters when using the window coordinates.
$left_i:=20
$top_i:=50
$right_i:=320
$bottom_i:=250
Fnd_Pref_SetWindow ("MonitorWindow";$left_i;$top_i;$right_i;$bottom_i)
Window coordinates are always stored locally. They cannot be stored as server or shared preferences.
Extracted source text
Fnd_Pref_SetWindow ({{name}; window ref})
Parameter Type Description
name Pointer Name of the preference item (optional)
window ref Longint Window to save (optional)
Fnd_Pref_SetWindow (name; left; top; right; bottom)
Parameter Type Description
name Text Name of the preference item
left Longint Left coordinate
top Longint Top coordinate
right Longint Right coordinate
bottom Longint Bottom coordinate
This routine saves the coordinates of the current window in the user’s preferences file. The values can be
set either by using the window reference or the left, top, right, and bottom coordinates.
To save the values using the window reference, pass a preference name and the window reference
number that has been returned by one of 4D’s window opening commands. If no name is specified, the
current process name is used. If no window is specified, the frontmost window of the current process is
used.
See the example in Fnd_Pref_GetWindow.
To save the values using the left, top, right, and bottom coordinates, pass a preference name and the
coordinates. There are no optional parameters when using the window coordinates.
$left_i:=20
$top_i:=50
$right_i:=320
$bottom_i:=250
Fnd_Pref_SetWindow ("MonitorWindow";$left_i;$top_i;$right_i;$bottom_i)
Window coordinates are always stored locally. They cannot be stored as server or shared preferences.