Moves items from one location in the tree to another location.

Syntax

rv = Send_Message(Ctrl, "OLE.MoveItems", Items, DestItem, Action)

Parameters

ParameterDescription
ItemsThe items to be moved
DestItemThe items' new location
ActionDetermines whether the items are added to the destination, or inserted before or after it

Remarks

The MoveItems method moves items from one location in the tree to another location in the same tree. The Items parameter is an @FM delimited list of item keys. The DestItem parameter is the key of the item to which the items will be added or before or after which the items will be inserted. The Action parameter specifies how the items are moved. Set the parameter to "Add" to add the items as children to the destination item. Use "Before" or "After" to insert the items before or after the destination item respectively. In any case, the items will be removed from their old location and placed into the new one.

The DestItem parameter can only be set to "" if the Action parameter is set to "Add".

Example

// Assume a tree with boys and girls organized into teams 
// Move the unassigned children to the blue team 
Items = "Abigail":@FM:"Hailey":@FM:"Joshua":@FM:"Logan" 
Send_Message(@Window:".OLE_TREE", "OLE.MoveItems", Items, "BlueTeam", "Add")

See Also

AddItemsInsertItemsRemoveItemsRemoveAllItems

  • No labels