copy

adds a copy of an item and places it in the specified position

void copy(string id,number index,TreeCollection target,string target_id);

Parameters

idstringthe ID of the item
indexnumberthe position of a copy
targetTreeCollectiona data collection where the copy will be stored
target_idstring(for menu options) the ID of a menuItem to which a copy of the menu option will be placed

Example

toolbar.data.copy("print_btn",2)
// another toolbar
toolbar2.data.copy("save_btn",1,toolbar1.data);

Back to top