Defines a collection base class that can search for an item by its display name and also knows how to assign to TStrings.
Use the IndexOf method to search for a collection item that has a DisplayName equal to the search string.
Namespace: Structures
Delphi
|
type
TGCollection = class(TOwnedCollection)
end;
|
|
Name
|
Description
|
|
AssignTo(TPersistent)
|
Represents method AssignTo(TPersistent).
|
|
IndexOf(String)
|
Returns the index of the collection item where CollectionItem.DisplayName equals the DisplayName search parameter. The comparison is case sensitive.
If no collection item equals the parameter, the function returns a -1.
|
Top
|
To assign this collection to a TStrings, use the TStrings.Assign method, e.g.,
Delphi
|
begin
ListBox1.Items.Assign(MyCollection);
end;
|
|