[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TStrings.InsertObject

Insert a string and associated object in the list.

Declaration

Source position: classesh.inc line 495

public procedure TStrings.InsertObject(

  Index: Integer;

  const S: String;

  AObject: TObject

);

Description

InsertObjectinserts the string Sand its associated objectAObjectat position Indexin the list. Indexis a zero-based position, and can have values from 0to Count. If Indexequals Countthen the string is appended to the list.

Errors

If Indexis less than zero or larger than Countthen an EStringListErrorexception is raised.

See also

TStrings.Insert

  

Insert a string in the list.

TStrings.AddObject

  

Add a string and associated object to the list.

TStrings.Append

  

Add a string to the list.

TStrings.Delete

  

Delete a string from the list.