[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Adds an item to the list.
Source position: stdctrls.pp line 613
public procedure TCustomListBox.AddItem( |
const Item: string; |
AnObject: TObject |
); |
Item |
|
The item text. |
AnObject |
|
The associated object, or Nil when not used. |
AddItem is a method used to add a string (and an optional associated object) to the Items for the control. AddItem calls the AddObject method in Items using Item and AnObject as arguments.
Item contains the string value added to the Items in the control.
AnObject is an optional object instance associated with the item, and contains Nil when an object instance has not been assigned. The object can be retrieved using the Items.Objects property for the ItemIndex, and must be cast to the required class type to access values in the object instance.
|
The list of all items defined in the control. |
Version 3.2 | Generated 2024-02-25 | Home |