Page History
...
The SendItems method sends copies of items from this tree to another tree. In order for this method to work, you must be sure to set the CtrlEntId properties for all SRP Tree Controls. The Items parameter is an @VM delimited list of items you wish to send. The DestCtrl parameter is the CtrlEntId of the tree to which the items should be sent, and the DestItem parameter is the destination item within the destination tree to which the items will be added or before or after which the items will be inserted.
...
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.
If you need to send the items' parents along with the items themselves, use the TransferItems method instead.
Example
Code Block |
---|
// Assume two trees with boys and girls organized into teams // Send the unassigned children to the green team in tree #2 Items = "Abigail":@VM:"Hailey":@VM:"Joshua":@VM:"Logan" // Since there are more than 4 parameters, we have to pass them in an array Params = "" Params<1> = Items ;// Items Params<2> = @Window:".OLE_TREE_2" ;// DestCtrl Params<3> = "GreenTeam" ;// DestItem Params<4> = "Add" ;// Action Params<5> = 1 ;// Animate Params<6> = 1 ;// IncludeChildren // Be sure to append the method name with @FM:1, since there are more than 4 parameters Send_Message(@Window:".OLE_TREE", "OLE.SendItems":@FM:1, Params) // Remove the items from this tree to simulate a move operation Send_Message(@Window:".OLE_TREE", "OLE.RemoveItems", Items) |