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
Inserts a new item following the specified index position.
VB.NET | ItemIndex = object.InsertAfter(ByVal AfterIndex As Integer, ByVal Text As String) As Integer |
VB | ItemIndex = object.InsertAfter(ByVal AfterIndex As Long, ByVal Text As String) As Long |
C#.NET | int ItemIndex = object.InsertAfter(int AfterIndex, string Text); |
VC++ | long ItemIndex = object->InsertAfter(long AfterIndex, _bstr_t Text); |
C | HRESULT object->raw_InsertAfter(long AfterIndex, BSTR Text, long* ItemIndex); |
object
A SftTreeItems object.
AfterIndex
The zero-based index of the position after which the item will be inserted. If -1 is specified, the item is added at the end of the list.
Text
The text to be used for the item's first (or only) column.
ItemIndex
Returns the zero-based index of the newly inserted item.
The InsertAfter method inserts a new item following the specified index position.
By default, new items are added at level 0. Use the Item.Level property to change an item's level. If many items have to be added, the BulkUpdate property can be used to indicate a mass-update, which is significantly faster.
Once an item has been added, the Cell.Text property can be used to change the text for any of the available columns.
Items can be added at the end of the list by using the Items.Add method. Items can be deleted using the Items.Remove method.
When a tree control is populated using Items.Add or Items.Insert, the Items.RecalcHorizontalExtent method can be used to have the tree control calculate the optimal horizontal scrolling area so scroll bars are enabled, depending on the Scrollbars property.
If a parent item is collapsed, subsequently adding child items will automatically expand the item.
Items can also be added using the Items.Insert method.
See Also SftTreeItems Object | Object Hierarchy