SET MARK TO

Left, Top

These two properties together indicate the location of an object.

Usage

oObject.Left = nPosition nPosition = oObject.Left oObject.Top = nPosition nPosition = oObject.Top
Left is the position of the left-hand edge of a form or control, while Top is the location of the top of the object. Both are measured in the current ScaleMode and are relative to the containing object. That is, Left for a control in a form is the distance from the left edge of the form.

You can move an object by changing its Left and/or Top values, except for controls contained in columns of a grid.

If you're like us, you might expect MaxLeft and MaxTop to provide limits for the values of Left and Top. In fact, they don't. They're about the position of the form when it's maximized.

Example

frmMyForm = CREATEOBJECT("FORM") frmMyForm.Show() frmMyForm.AddObject("chkMyCheck", "Checkbox") frmMyForm.chkMyCheck.Visible = .t. frmMyForm.chkMyCheck.Left = 10 frmMyForm.chkMyCheck.Top = 20 * now add another object under the first frmMyForm.AddObject("chkMyOtherCheck", "Checkbox") frmMyForm.chkMyOtherCheck.visible = .t. frmMyForm.chkMyOtherCheck.Left = frmMyForm.chkMyCheck.Left frmMyForm.chkMyOtherCheck.Top = ;    frmMyForm.chkMyCheck.Top + 20

See Also

Height, MaxLeft, MaxTop, ObjToClient(), ScaleMode, Width


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net