FMX.AddressBook.TAddressBookContacts

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

System.Generics.Collections.TObjectListSystem.Generics.Collections.TListSystem.Generics.Collections.TEnumerableSystem.TObjectTAddressBookContacts

Delphi

TAddressBookContacts = class(TObjectList<TAddressBookContact>);

C++

class PASCALIMPLEMENTATION TAddressBookContacts : public System::Generics::Collections::TObjectList__1<TAddressBookContact*>

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
class public
FMX.AddressBook.pas
FMX.AddressBook.hpp
FMX.AddressBook FMX.AddressBook


Beschreibung

Repräsentiert eine geordnete Liste von Kontakten, auf die über einen Index zugegriffen werden kann.

Beispiele

Sehen Sie zur Klärung folgende Beispiele. Diese Codefragmente zeigen, wie alle Kontakte von der Standardquelle in einem Geräte-Adressbuch abgerufen werden können.

Hinweis: Vor dem Aufrufen der AllContacts-Methode sollten Sie explizit eine Instanz des AContacts-Objekts mit der TAdressBookContacts.Create-Methode (für Delphi) oder neu (für C++Builder) initialisieren.

Delphi:
var
  Contacts: TAddressBookContacts;
begin
  Contacts := TAddressBookContacts.Create;
  try
    // Get all contacts from the default source
    AddressBook1.AllContacts(AddressBook1.DefaultSource, Contacts);
    // do something with contacts
  finally
    Contacts.Free;
  end;
end;
C++Builder:
{
TAddressBookContacts *Contacts;
	Contacts = new TAddressBookContacts();
	__try {
                // Get all contacts from the default source
		AddressBook1->AllContacts(AddressBook1->DefaultSource(), Contacts);
		// do something with contacts
	}
	__finally {
		Contacts->Free();
	}
}

Weitere Informationen und Beispiele finden Sie unter Mobile-Tutorial: Verwenden der Adressbuch-Komponente (iOS und Android).

Siehe auch