Transfers copies of items to another tree.

Syntax

rv = Send_Message(Ctrl, "OLE.TransferItems", Items, DestCtrl, Animate, IncludeChildren)

Parameters

ParameterDescription
ItemsThe items to be sent
DestCtrlThe destination tree control
AnimateDetermines whether or not the user will see the items travel to the new tree control
IncludeChildrenDetermines whether or not all children of the specified items are to be sent too

Remarks

The TransferItems method transfers copies of items from this tree to another tree. Unlike the SendItems method, which only sends items and their children, this method also sends the items' parents. This is useful if you need to synchronize two trees. In other words, this is a control-to-control transfer of items, rather than an item-to-item copy.

The Items parameter is an @FM delimited list of items you wish to send. The DestCtrl parameter is the CtrlEntId of the tree to which the items should be sent. There is no need to specify a destination item within the destination tree because all parents will be copied with the items.

The Animate parameter is a flag indicating whether or not an animation should occur. Setting this parameter to 1 will cause the items to appear, to the user, as if the items are flying from the source tree to the destination tree. Set this to 0 if you don't need the feedback or if either of the trees are not currently visible to the user.

The IncludeChildren parameter is a flag indicating whether or not the given items' children are to be transferred as well. Set this to 1 to cause all the items' children to copy over with them or to 0 to send just the items listed.

Calling this method performs a copy, so the items will still exist in the source tree. If you wish to simulate a move, then follow this method with a call to the RemoveItems method.

Example

// Assume two trees with boys and girls organized into teams 
// Transfer Matthew from the Blue Team in Tree #1 to the Blue Team in Tree #2 
Send_Message(@Window:".OLE_TREE", "OLE.TransferItems", "Matthew", @Window:".OLE_TREE_2", 1, 1)

See Also

AnimateItemSendItems

  • No labels