function Add(Item: Pointer): Integer Adds Item to the end of the list. procedure Clear Deletes all items from the list. procedure Delete(Index: Integer) Deletes the item at the given Index. procedure Exchange(Index1, Index2) Swaps the items at Index1 and Index2. function Expand: TList Increases the size of the list. function First: Pointer Returns Items[0]. function IndexOf(Item: Pointer): Integer Returns the index of the first item to match Item. procedure Insert(Index: Integer; Item: Pointer) Inserts the item at position Index. function Last: Pointer Returns Items[Count-1]. procedure Move(CurIndex, NewIndex: Integer) Moves the item at CurIndex to NewIndex. procedure Pack Deletes all nil items. function Remove(Item: Pointer): Integer Deletes the first item that matches Item. property Capacity: Integer Sets or gets the number of available slots where list items can be stored. property Count: Integer Sets or gets the number of items in the list. property Items[Index: Integer]: Pointer; default Sets or gets the item at position Index. property List: PPointerList Returns a pointer to the array where TList stores its items.
The first is the TListDataSet component, a dataset supporting navigation among the data of a TObjectList. This is one of the new Delphi 5 container classes, which only slightly differs from TList. It uses objects instead of pointers (nothing really different, from a technical point of view) and has the ability to destroy the objects in the list when the list is destroyed or cleared.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.