Purpose

.Move() allows you to specify the new size and or location of certain objects.
 

Object Type

Client

Syntax

ObjectReference.MOVE(start_row, start_column, width, height)
 

Operation

ObjectReference is the Tag Name of the object
start_row & start_column is the top left location of the object

width & height is the width and height of the object

 

Remarks

This method cannot be used to retrieve current position or size information about an object.

This command must be used before definitions are sent to the Windows Client so this command can be used only in the Logic In or the Entry Logic of a Cycle if the object is a Format object, and can only be used in Logic In if the object is a Field object.

Any of the four parameters can be changed without changing the others.  Parameters with a value of zero retain their current value.

The valid values for the start row and start column depend upon the cycle.

If the cycle belongs to a pop-up window, the value of the row should be between the window’s start row and the end row.  The value of the column will be between the window’s start column and the end column.

If the cycle belongs to the base cycle (not a pop-up window), the row value should be between 1 and the screen’s maximum. The column value should be between 1 and the screen’s maximum value.

If it is a Dynamic object on a Paging Screen and the object’s field number is between the start field number and contracted end field number, the object should fit within the height of the contracted lines per record.  If not, the object should fit within the height of expanded lines per record.  In either case the column number should be between the Paging Screen’s start column number and the end column number.

An error will not be generated at gen time if the row and/or column values are out of range.  

At function runtime, the kernel will check the boundaries of the object.  When running the function the kernel will guarantee that the start row and start column are within the screen boundary.  If the object falls entirely outside the screen boundaries, it will be moved so that the start row and start column are in bounds.  If it is too large, the Windows Client will truncate the object.  

For some objects, such as static text and icons, the size changes may not always be effective since these objects may need to have the Scale property set to see the change.  It is the developer’s responsibility to do this.
 

Examples

To move and resize an edit box field (Tag Name = NOTES) to a new position of top left row 4, column 10, and size it so that the bottom right is at row 8, column 21:

NOTES.MOVE(4,10,12,5)


To leave the size unchanged, but change the top left to row 4, column 10:

NOTES.MOVE(4,10)


To leave the starting column and size unchanged, but move the object to row 4:

NOTES.MOVE(4)


To leave the starting row and size unchanged, but move the object to column 10:

NOTES.MOVE(0,10)


To leave the object in the same position (pinned at the top left corner), but change the size to be 12 columns wide by five rows high:

NOTES.MOVE(0,0,12,5)


To leave the object in the same position (pinned at the top left corner) with the same height, but change the width to 12 columns:

NOTES.MOVE(0,0,12)


To leave the object in the same position (pinned at the top left corner) with the same width, but change the height to five rows:

NOTES.MOVE(0,0,0,5)  
 

Comment on this topic

Topic ID: 510022