[Overview][Resource strings][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'tiObject' (#tiopf)

TtiObjectList.Insert

Adds an object to the list at the position specified by Index

Declaration

Source position: tiObject.pas line 640

public procedure TtiObjectList.Insert(

  const AIndex: Integer;

  const AObject: TtiObject

); virtual; overload;

procedure TtiObjectList.Insert(

  const AInsertBefore: TtiObject;

  const AObject: TtiObject

); virtual; overload;

Description

Call Insert to add an object at a specified position in the list, shifting the item that previously occupied that position (and all subsequent items) up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity. The Index parameter is zero-based, so the first position in the list has an index of 0. To replace a nil reference with a new object without growing the array, set the Items property directly.


Documentation generated on: 2017-08-16