SetPosition method

Sets the position of an item within the folder that contains it.

Syntax


C++
HRESULT SetPosition (
   LONG Row,
   LONG Column)
Scripting languages
Object.SetPosition
   Row as Long,
   Column as Long

Parameters


Row

The new row position of the item.

Column

The new column position of the item.

Return value


C++

The return code.

Scripting languages

None.

Remarks


Newly-added items automatically snap to an invisible spacing grid in their new locations. Folder Page displays are five columns wide and Note Page displays are one column wide.

The default spacing for new objects in a folder is one object every two rows or columns. Odd-numbered columns or rows allow placement of objects between standard-spaced objects. For example, you could create a staggered effect by positioning objects in row 0 at columns 0, 2, and 4, and in row 2 at columns 1, 3, and 5. Or, you could create a more compact effect by assigning adjacent positions to items.

If you call SetPosition and specify a position that's already taken by another item, SetPosition looks for the nearest available spot to the right and then down, using even row and column numbers, and automatically wrapping to the next row when it reaches the end of the right-most column.

Vertical scroll bars are automatically added when there are too many rows to see on the screen. Horizontal scroll bars are created only if you use SetPosition to place an item in a column that's not normally visible on the page.

Home

Applies to

IERUPrincipalItem


See also

Creating Items