GuiLocation - DfBaseWindow

Determines the position of the object expressed in physical pixels relative to the upper left-hand corner of the parent object's client-area

Type: Property

Access: Read/Write

Data Type: Folded Integer

Parameters: None

Description

GuiLocation determines the position (along the X and Y axis) of the object expressed in physical pixels (the native display-coordinate system) relative to the upper left-hand corner of the containing object's client area. Note that objects are always located relative to their parent object's client-area and not their outer bounding Window.

Normally objects are located using the Location message which uses dialog units. Setting logical coordinates also sets the physical (gui) coordinates.

This is a folded integer property.

When this property is set, two integer parameters are passed as specified in the parameter list. When the value of the property is retrieved, the value of these two properties is returned as a folded integer. The value of these parameters can be accessed using the hi() and low() functions.

The property is set as follows:

Set GuiLocation to iRowPos iColPos

The property is retrieved as follows:

Get GuiLocation to iValue
Move (Hi(iValue)) to iHeight
Move (Low(iValue)) to iWidth


If an object's location is set using the GuiLocation message, the Adjust_Logicals message should be sent to adjust the object's logical coordinates.

Procedure Example
    integer iRowCol iRw iCol

    Get GuiLocation to iRowCol
    Move  (hi(iRowCol)) to iRw
    Move (low(iRowCol)) to iCol
    Set GuiLocation to (iRw +20) (iCol +10)
    Set GuiSize to 100 200
    Send Adjust_Logicals
End_Procedure

See Also

Location | Size | GuiSize | GuiToDialog | DialogToGui