Skip to main content

TdxDynamicItemList.InsertItem(TdxDynamicListItem,TdxDynamicListItem) Method

Inserts an item adjacent to the specified item within the list.

Declaration

procedure InsertItem(const ANewItem: TdxDynamicListItem; const ANeighborItem: TdxDynamicListItem);

Parameters

Name Type
ANewItem TdxDynamicListItem
ANeighborItem TdxDynamicListItem

Remarks

This procedure inserts an item passed as the ANewItem parameter into the chain of stored items either prior to or following the item passed as the ANeighborItem parameter, depending on their indexes. For instance, the inserted item follows its neighbor if the latter has a lower index value.

If the inserted item is either the first or last in the resulting chain the InsertItem procedure links the item only to its neighbor.

See Also