SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Copies an item to a new position in the tree control.
Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public ItemClass Copy( ItemCollectionClass ItemCollection, bool fDeep ); public ItemClass Copy( ItemClass ItemTarget, CopyStyleEnum Style, bool fDeep );
Public Function Copy( ByVal ItemCollection As ItemCollectionClass, ByVal fDeep As Boolean ) As ItemClass Public Function Copy( ByVal ItemTarget As ItemClass, ByVal Style As CopyStyleEnum, ByVal fDeep As Boolean ) As ItemClass
ItemCollection
The item collection.
fDeep
Defines whether child items are also copied. True to copy all child items, otherwise False.
ItemTarget
Specifies the target item, where the new item is to be copied to.
Style
Defines how the item is copied.
The new item.
Copies an item to a new position in the tree control.
The newly inserted item is no longer selected.
The Copy method accepting an ItemCollection argument is usually used when copying items into an empty tree control. The tree control's empty item collection is represented by the SftTree.ItemCollection property.
Items that are copied lose their selection status and are no longer selected.
if (e.Effect == DragDropEffects.Move) { try { newItem = originalItem.Move(targetItem, MoveStyleEnum.TargetAsParentInsertFirst); } catch (Exception exc) { MessageBox.Show(exc.Message); } } else { try { newItem = originalItem.Copy(targetItem, CopyStyleEnum.TargetAsParentInsertFirst, true); } catch (Exception exc) { MessageBox.Show(exc.Message); } } if (newItem != null) { sftTree1.Columns.MakeOptimal(0, false); newItem.ScrollIntoView();
If e.Effect = DragDropEffects.Move Then Try newItem = originalItem.Move(targetItem, MoveStyleEnum.TargetAsParentInsertFirst) Catch exc As Exception MessageBox.Show(exc.Message) End Try Else Try newItem = originalItem.Copy(targetItem, CopyStyleEnum.TargetAsParentInsertFirst, True) Catch exc As Exception MessageBox.Show(exc.Message) End Try End If If Not newItem Is Nothing Then SftTree1.Columns.MakeOptimal(0, False) newItem.ScrollIntoView()
See Also ItemClass Class | Classes | SftTree/NET 2.0