Location - cUIObject

Determines the position of the upper left pixel of the object's window

Type: Property

Access: Read/Write

Data Type: Folded Integer

Parameters: None

Description

The location property determines the position of the upper left pixel of the object's window, where the 0;0 coordinate is the upper left position of the screen.

An object's location is set relative to its parent container's client area. In this case, the 0;0 coordinate is the upper left position of the parent container. For example, setting the location of a dbForm object that is placed on a dbView object (child of the dbView) to 0;0, will place the upper left hand corner of the dbForm right on top of the upper left hand corner of the dbView's client area.

An object on the desktop is located relative to your computer screen. A good example of this is a Panel object, which is the outermost "main panel" object in a typical DataFlex Windows application.

Set Location to 2 0 

Procedure MoveLeft Handle hoObject
    If (Low (Location (hoObject)) > 0) Begin
        Set Location Of hoObject To (Hi (Location (hoObject))) (Low (Location (hoObject)) - 1) 
    End
End_Procedure 


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 Location to iRowPos iColPos

The property is retrieved as follows:

Get Location to iValue
Move (Hi(iValue)) to iRowPos
Move (Low(iValue)) to iColPos


Note:
Due to the fact that Location is a folded integer, setting either the Y or X value to a negative value is impossible. Settting the Location to -1;-1 results in a value of -1 (both X and Y will be 65535).


Note:
Location is not supported in the cSplitterContainer class.

See Also

Size | GuiLocation | GuiSize | GuiToDialog | DialogToGui