Move
This method lets you move an object. You can resize it at the same time.
Usage |
oObject.Move( nLeft [, nTop [, nWidth [, nHeight ] ] ] ) |
Example |
* This might be the Click for a command button. This.Move(This.Left + This.Width/4, ; This.Top - 50, This.Width / 2, This.Height * 3 / 2) =inkey(.1) && stop and let the user see This.Move(This.Left - This.Width / 2, ; This.Top + 50, This.Width * 2, This.Height * 2 / 3) |
* RelativeMove - a custom method * Pass positive values to move right and down and to make object larger * Pass negative values to move left and up and to make object smaller LPARAMETERS nLeft, nTop, nWidth, nHeight LOCAL nNewLeft, nNewTop, nNewWidth, nNewHeight nNewLeft = IIF( VARTYPE('nLeft')="N", This.Left + nLeft, This.Left) nNewTop = IIF( VARTYPE('nTop')="N", This.Top + nTop, This.Top) nNewWidth = IIF( VARTYPE('nWidth')="N", This.Width + nWidth, This.Width) nNewHeight = IIF( VARTYPE('nHeight')="N", This.Height + nHeight, This.Height) This.Move(nNewLeft, nNewTop, nNewWidth, nNewHeight) ENDPROC
See Also |